summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorOwen W. Taylor <otaylor@fishsoup.net>2015-02-23 19:39:12 -0500
committerOwen W. Taylor <otaylor@fishsoup.net>2015-02-23 19:40:39 -0500
commit4043b7ad760d73ae618ce7a2775b1b987797a8be (patch)
treecb96ec5c92ff3842253faba3665772133c3981af
parente9047876089d938921b35e03216c93b5e4708124 (diff)
downloadgit-bz-4043b7ad760d73ae618ce7a2775b1b987797a8be.tar.gz
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
-rwxr-xr-xgit-bz2
1 files changed, 1 insertions, 1 deletions
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'<input type="hidden" name="token" value="(.+)">',