From f844e2c344f041ce4fa040f31f0f45fb003e8860 Mon Sep 17 00:00:00 2001 From: Jon Ciesla Date: Wed, 5 Sep 2012 13:47:31 -0500 Subject: [PATCH] Possible fix for BZ errors. --- .../process-git-requests/process-git-requests | 38 ++++++++++++++++--- 1 file changed, 32 insertions(+), 6 deletions(-) diff --git a/scripts/process-git-requests/process-git-requests b/scripts/process-git-requests/process-git-requests index 30c93a7..23a5ece 100755 --- a/scripts/process-git-requests/process-git-requests +++ b/scripts/process-git-requests/process-git-requests @@ -569,9 +569,22 @@ def process_new_request(bug, comment, allcomments, firstfound, pkgdb, fas, branc return (False, True) print 'Updating bugzilla...' - # XXX Need to handle errors here - bug.updateflags({'fedora-cvs':'+', 'nomail':1}) - bug.addcomment(bug_comment) + # XXX Need to handle errors here - might be done, limburgher 2012-09-05 + try: + bug.updateflags({'fedora-cvs':'+', 'nomail':1}) + except Exception, e: + print "Bugzilla call failed:" + print e + raw_input('\nPress enter to continue to the next ticket.') + return (False, True) + try: + bug.addcomment(bug_comment) + except Exception, e: + print "Bugzilla call failed:" + print e + raw_input('\nPress enter to continue to the next ticket.') + return (False, True) + return (request['pkg'], True) else: pass @@ -690,9 +703,22 @@ def process_change_request(bug, comment, allcomments, firstfound, pkgdb, branche return (False, True) print 'Updating bugzilla...' - # XXX Need to handle errors here - bug.updateflags({'fedora-cvs':'+', 'nomail':1}) - bug.addcomment(bug_comment) + # XXX Need to handle errors here - might be done, limburgher 2012-09-05 + try: + bug.updateflags({'fedora-cvs':'+', 'nomail':1}) + except Exception, e: + print "Bugzilla call failed:" + print e + raw_input('\nPress enter to continue to the next ticket.') + return (False, True) + try: + bug.addcomment(bug_comment) + except Exception, e: + print "Bugzilla call failed:" + print e + raw_input('\nPress enter to continue to the next ticket.') + return (False, True) + return (request['pkg'], True) else: pass