From 10f23b519983f4f5686dc08edda83e72a76ae2a2 Mon Sep 17 00:00:00 2001 From: Will Woods Date: Fri, 4 Jan 2008 17:38:43 -0500 Subject: Handle missing bugs better when modifying --- bugzilla | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'bugzilla') diff --git a/bugzilla b/bugzilla index 0d05c78..41df3c0 100755 --- a/bugzilla +++ b/bugzilla @@ -256,7 +256,11 @@ if __name__ == '__main__': parser.error('No bug IDs given (maybe you forgot an argument somewhere?)') # Iterate over a list of Bug objects # FIXME: this should totally use some multicall magic - for bug in bz.getbugssimple(bugid_list): + buglist = bz.getbugssimple(bugid_list) + for id,bug in zip(bugid_list,buglist): + if not bug: + log.error(" failed to load bug %s" % id) + continue log.debug("modifying bug %s" % bug.bug_id) if opt.comment: log.debug(" add comment: %s" % opt.comment) -- cgit