diff options
author | Owen W. Taylor <otaylor@fishsoup.net> | 2015-02-23 19:39:12 -0500 |
---|---|---|
committer | Owen W. Taylor <otaylor@fishsoup.net> | 2015-02-23 19:40:39 -0500 |
commit | 4043b7ad760d73ae618ce7a2775b1b987797a8be (patch) | |
tree | cb96ec5c92ff3842253faba3665772133c3981af | |
parent | e9047876089d938921b35e03216c93b5e4708124 (diff) | |
download | git-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-x | git-bz | 2 |
1 files changed, 1 insertions, 1 deletions
@@ -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="(.+)">', |