diff options
author | Jiri Moskovcak <jmoskovc@redhat.com> | 2010-03-11 16:27:43 +0100 |
---|---|---|
committer | Jiri Moskovcak <jmoskovc@redhat.com> | 2010-03-11 16:27:43 +0100 |
commit | ad52eedb48493b74030a0eab5fcf07df071a1147 (patch) | |
tree | c675d5bb1cba8ad70568e0bd3e43856f7bb56810 /src | |
parent | d3fff839380fa1e165b92d3dc79fb7eafaf2a976 (diff) | |
parent | 3119d2c9b857f54d4a75e58bf3fee8ad48675cd4 (diff) | |
download | abrt-ad52eedb48493b74030a0eab5fcf07df071a1147.tar.gz abrt-ad52eedb48493b74030a0eab5fcf07df071a1147.tar.xz abrt-ad52eedb48493b74030a0eab5fcf07df071a1147.zip |
Merge branch 'master' of ssh://git.fedorahosted.org/git/abrt
Diffstat (limited to 'src')
-rwxr-xr-x | src/Backtrace/abrt-bz-dupchecker | 19 |
1 files changed, 14 insertions, 5 deletions
diff --git a/src/Backtrace/abrt-bz-dupchecker b/src/Backtrace/abrt-bz-dupchecker index dc2ef8ea..654a3702 100755 --- a/src/Backtrace/abrt-bz-dupchecker +++ b/src/Backtrace/abrt-bz-dupchecker @@ -191,6 +191,8 @@ for backtrace, components in database.items(): # Close all bugs where it is appropriate. if options.close: + LIMIT = 1000 + counter = 0 for (component, owner, bugitems, backtrace) in dups: # Find the master bug item # Its the one with the most comments. @@ -217,13 +219,20 @@ if options.close: if item['comments'] > 2: continue - print "Closing bug #{0} with {1} comments as a duplicate of #{2}.".format(item['id'], item['comments'], master['id']) bug = bz.getbug(int(item['id'])) + # Check the bug status AGAIN to make sure the bug is still opened. + if not bug.bug_status in ["NEW", "ASSIGNED"]: + continue + + print "Closing bug #{0} with {1} comments as a duplicate of #{2}.".format(item['id'], item['comments'], master['id']) bug.close("DUPLICATE", int(master['id']), "", - "This bug appears to have been filled using a buggy version of ABRT, because\n" + - "it contains a backtrace which is considered as a duplicate of the backtrace in #{0}." + - "Sorry for the inconvenience.\n\n" + - "Closing as a duplicate of #{0}.".format(master['id'])) + ("This bug appears to have been filled using a buggy version of ABRT, because\n" + + "it contains a backtrace which is a duplicate of backtrace from bug #{0}.\n\n" + + "Sorry for the inconvenience.").format(master['id'])) + + counter += 1 + if counter > LIMIT: + sys.exit(0) bz.logout() |