From 80192e3c57277f4c4a3f334a1e432eada627de40 Mon Sep 17 00:00:00 2001 From: Jay McCarthy Date: Thu, 11 Aug 2011 15:26:42 -0600 Subject: [PATCH] Fix crash when committer has new issue but no files of their own --- collects/meta/drdr/analyze.rkt | 20 +++++++++++--------- 1 file changed, 11 insertions(+), 9 deletions(-) diff --git a/collects/meta/drdr/analyze.rkt b/collects/meta/drdr/analyze.rkt index 01daae0128..552739fd66 100644 --- a/collects/meta/drdr/analyze.rkt +++ b/collects/meta/drdr/analyze.rkt @@ -205,15 +205,17 @@ "")))) "") empty) - (list* "A file you are responsible for has a condition that may need inspecting." - (for/list ([(id files) (in-hash (hash-ref responsible-ht r))] - #:when (not (symbol=? id 'changes))) - (list (format " ~a:" id) - (for/list ([f (in-list files)] - [i (in-range ERROR-LIMIT)]) - (format " ~a" (path->url f))) - "")) - "")))))) + (if (hash-has-key? responsible-ht r) + (list* "A file you are responsible for has a condition that may need inspecting." + (for/list ([(id files) (in-hash (hash-ref responsible-ht r))] + #:when (not (symbol=? id 'changes))) + (list (format " ~a:" id) + (for/list ([f (in-list files)] + [i (in-range ERROR-LIMIT)]) + (format " ~a" (path->url f))) + "")) + "") + empty)))))) ; Send message to IRC (send-mail-message "drdr"