From 4043b7ad760d73ae618ce7a2775b1b987797a8be Mon Sep 17 00:00:00 2001 From: "Owen W. Taylor" Date: Mon, 23 Feb 2015 19:39:12 -0500 Subject: Fix conflict between urllib2 support and Bugzilla 4.2+ support create_patch() now gets attachment.cgi to get a token - with the switch urllib2 this requires slightly different code. https://bugzilla.gnome.org/show_bug.cgi?id=725730 --- git-bz | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/git-bz b/git-bz index 8db7caa..894f8e4 100755 --- a/git-bz +++ b/git-bz @@ -1257,7 +1257,7 @@ class Bug(object): response = self.server.send_request("GET", url) except KeyboardInterrupt: die("Failed to retrieve attachment form: user cancelled") - if response.status != 200: + except urllib2.HTTPError as err: die("Failed to retrieve attachment form: %d" % response.status) token = re.search(r'', -- cgit