diff options
author | Owen W. Taylor <otaylor@fishsoup.net> | 2009-08-15 19:41:57 -0400 |
---|---|---|
committer | Owen W. Taylor <otaylor@fishsoup.net> | 2009-08-15 19:41:57 -0400 |
commit | fa0b3a32ae62430609c52f62e658f6bc114a320e (patch) | |
tree | c994d123feb43e6554728ceb2e3a855a0925ecea | |
parent | f15af50ac558eacaf2fd4f641df52975ffd05145 (diff) |
Fix to work with Bugzilla 3.4
Bugzilla 3.4 (like the new GNOME bugzilla)
- Requires a status for attached patches
- Uses a different title for succesful attachments
-rwxr-xr-x | git-bz | 7 |
1 files changed, 5 insertions, 2 deletions
@@ -798,6 +798,7 @@ class Bug(object): fields['bugid'] = str(self.id) fields['action'] = 'insert' fields['ispatch'] = '1' + fields['attachments.status'] = 'none' fields['description'] = description if comment: fields['comment'] = comment @@ -817,10 +818,12 @@ class Bug(object): if response.status != 200: die ("Failed to attach patch to bug: status=%d" % response.status) - # We hope that this is constant across bugzilla versions for a - # successful attachment + # Older bugzilla's used this for successful attachments m = re.search(r"<title>\s*Changes\s+Submitted", response_data) if not m: + # Newer bugzilla's, use, instead: + m = re.search(r"<title>\s*Attachment\s+\d+\s+added", response_data) + if not m: print response_data die ("Failed to attach patch to bug") |