diff options
author | Owen W. Taylor <otaylor@fishsoup.net> | 2015-02-27 16:16:05 -0500 |
---|---|---|
committer | Owen W. Taylor <otaylor@fishsoup.net> | 2015-02-27 16:18:23 -0500 |
commit | 612e669d5d8b52fc929b2c05ed32c8eab32330c1 (patch) | |
tree | 3a160254c37c0ec03c16ede2ba9a126c7817386f | |
parent | a1ed1a7fc69053667ddf1e82e38a8e993a0ca31d (diff) | |
download | git-bz-612e669d5d8b52fc929b2c05ed32c8eab32330c1.tar.gz |
Loosen up sucesss regexes to handle configuration of the "Bug" term
bugzilla.mozilla.org is configured so that the title is just "123456"
and it just says "123456 processed"; it would also be possible to
configure a bugzilla instance to say "Issue" (etc.) instead of "Bug" -
try to handle these differences.
-rwxr-xr-x | git-bz | 4 |
1 files changed, 2 insertions, 2 deletions
@@ -1302,7 +1302,7 @@ class Bug(object): except urllib2.HTTPError as err: die("Failed to create bug, status=%d" % err.code); - m = check_for_success(response_data, r"<title>\s*Bug\s+([0-9]+)") + m = check_for_success(response_data, r"<title>\s*(\S+\s+)?([0-9]+)") if not m: print response_data die("Failed to create bug") @@ -1392,7 +1392,7 @@ class Bug(object): die ("Failed to update bug %d, status=%d" % (self.id, err.code)) if not check_for_success(response_data, - r"<title>\s*Bug[\S\s]*processed\s*</title>"): + r"<title>[\S\s]{0,100}processed\s*</title>"): # Mid-air collisions would be indicated by # "<title>Mid-air collision!</title>" |