summaryrefslogtreecommitdiffstats
path: root/scripts
diff options
context:
space:
mode:
authorKarel Klic <kklic@redhat.com>2010-03-31 15:12:41 +0200
committerKarel Klic <kklic@redhat.com>2010-03-31 15:12:41 +0200
commit41d165340e8367d66719d5e306cdf55164f6b3c3 (patch)
tree08295a240a5d2fa584c7bd03dac14b1cb09bfac4 /scripts
parentd97ff74a7c897122d4789418efa451bee2f0b784 (diff)
downloadabrt-41d165340e8367d66719d5e306cdf55164f6b3c3.tar.gz
abrt-41d165340e8367d66719d5e306cdf55164f6b3c3.tar.xz
abrt-41d165340e8367d66719d5e306cdf55164f6b3c3.zip
Removed trailing whitespaces.
Diffstat (limited to 'scripts')
-rwxr-xr-xscripts/abrt-bz-downloader2
-rwxr-xr-xscripts/abrt-bz-dupchecker38
-rwxr-xr-xscripts/abrt-bz-hashchecker2
-rwxr-xr-xscripts/abrt-bz-stats24
-rwxr-xr-xscripts/check-bt-parsability2
5 files changed, 34 insertions, 34 deletions
diff --git a/scripts/abrt-bz-downloader b/scripts/abrt-bz-downloader
index 7f294257..d7f5a719 100755
--- a/scripts/abrt-bz-downloader
+++ b/scripts/abrt-bz-downloader
@@ -3,7 +3,7 @@
# ABRT Bugzilla Backtrace Downloader
# Downloads all backtraces reported by ABRT from Bugzilla.
#
-# Please do not run this script unless it's neccessary to do so.
+# Please do not run this script unless it's neccessary to do so.
# It forces Bugzilla to send data related to thousands of bug reports.
from bugzilla import RHBugzilla
diff --git a/scripts/abrt-bz-dupchecker b/scripts/abrt-bz-dupchecker
index 654a3702..89e13281 100755
--- a/scripts/abrt-bz-dupchecker
+++ b/scripts/abrt-bz-dupchecker
@@ -2,13 +2,13 @@
# -*- mode:python -*-
# ABRT Bugzilla Duplication Checker
# Downloads all backtraces reported by ABRT from Bugzilla,
-# and search for duplicates using the newest ABRT duplication
+# and search for duplicates using the newest ABRT duplication
# checker.
#
# Some bugs in Bugzilla were reported by older ABRT
# versions, which had poor duplication detection.
#
-# Please do not run this script unless it's neccessary to do so.
+# Please do not run this script unless it's neccessary to do so.
# It forces Bugzilla to send data related to thousands of bug reports.
#
#
@@ -37,9 +37,9 @@ parser.add_option("-b", "--bugzilla", dest="bugzilla", default="https://bugzilla
help="Bugzilla URL (defaults to Red Hat Bugzilla)", metavar="URL")
parser.add_option("-v", "--verbose", dest="verbose",
help="Detailed output")
-parser.add_option("-c", "--close", help="Close some of the bugs in Bugzilla (DANGEROUS)",
+parser.add_option("-c", "--close", help="Close some of the bugs in Bugzilla (DANGEROUS)",
action="store_true", default=False, dest="close")
-parser.add_option("-i", "--wiki", help="Generate output in wiki syntax",
+parser.add_option("-i", "--wiki", help="Generate output in wiki syntax",
action="store_true", default=False, dest="wiki")
(options, args) = parser.parse_args()
@@ -60,7 +60,7 @@ print "{0} bugs found.".format(len(buginfos))
#
# Load cache from previous run. Speeds up the case Bugzilla closes connection.
-# The cache should be manually removed after a day or so, because the data in it
+# The cache should be manually removed after a day or so, because the data in it
# are no longer valid.
#
database = {}
@@ -77,7 +77,7 @@ def save_to_cache():
f = open(CACHE_FILE, 'w')
cPickle.dump(database, f, 2)
cPickle.dump(ids, f, 2)
- f.close()
+ f.close()
count = 0
for buginfo in buginfos:
@@ -121,7 +121,7 @@ for buginfo in buginfos:
# abrt_hash, but it does not copy the attachment.
if not downloaded:
continue
-
+
command = ["./abrt-backtrace"]
command.append(filename)
command.append("--single-thread")
@@ -161,12 +161,12 @@ dupclosecount = 0
for backtrace, components in database.items():
for component, bugitems in components.items():
dupcount += len(bugitems) - 1
- dupclosecount += min(len(filter(lambda x: x <= 2,
- map(lambda x: x["comments"],
+ dupclosecount += min(len(filter(lambda x: x <= 2,
+ map(lambda x: x["comments"],
bugitems))),
len(bugitems) - 1)
-# Get the component owner.
+# Get the component owner.
# Sort the duplicates by the component owner, and
# filter out those which should not be printed.
dups = []
@@ -185,7 +185,7 @@ for backtrace, components in database.items():
owner = component_f12[0]["owner"]
except KeyError:
pass
-
+
dups.append((component, owner, bugitems, backtrace))
print "."
@@ -196,12 +196,12 @@ if options.close:
for (component, owner, bugitems, backtrace) in dups:
# Find the master bug item
# Its the one with the most comments.
-
+
# Sort function sorting by comment count.
def commentCmp(x, y):
if x['comments'] < y['comments']:
return 1
- elif x['comments'] == y['comments']:
+ elif x['comments'] == y['comments']:
# Sort by bug id, older bugs should became the master bug
if x['id'] > y['id']:
return 1
@@ -225,7 +225,7 @@ if options.close:
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']), "",
+ 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 a duplicate of backtrace from bug #{0}.\n\n" +
"Sorry for the inconvenience.").format(master['id']))
@@ -233,7 +233,7 @@ if options.close:
counter += 1
if counter > LIMIT:
sys.exit(0)
-
+
bz.logout()
print
@@ -257,8 +257,8 @@ for (component, owner, bugitems, backtrace) in sorted(dups, cmp):
print "----"
print "* component: '''{0}''' ({1})".format(component, owner)
print "* duplicates: {0}".format(
- reduce(lambda x,y: x+", "+y,
- map(lambda x: "#[https://bugzilla.redhat.com/show_bug.cgi?id={0} {0}] ({1} comments)".format(x['id'],x['comments']),
+ reduce(lambda x,y: x+", "+y,
+ map(lambda x: "#[https://bugzilla.redhat.com/show_bug.cgi?id={0} {0}] ({1} comments)".format(x['id'],x['comments']),
bugitems)))
print "* backtrace:"
for line in backtrace.replace("Thread\n", "").splitlines():
@@ -266,7 +266,7 @@ for (component, owner, bugitems, backtrace) in sorted(dups, cmp):
else:
print "Component: {0} ({1})".format(component, owner)
print "Duplicates: {0}".format(
- reduce(lambda x,y: x+", "+y,
- map(lambda x: "{0} ({1})".format(x['id'],x['comments']),
+ reduce(lambda x,y: x+", "+y,
+ map(lambda x: "{0} ({1})".format(x['id'],x['comments']),
bugitems)))
print "Backtrace: {0}".format(backtrace)
diff --git a/scripts/abrt-bz-hashchecker b/scripts/abrt-bz-hashchecker
index ec7ce1a6..bb66c7d4 100755
--- a/scripts/abrt-bz-hashchecker
+++ b/scripts/abrt-bz-hashchecker
@@ -2,7 +2,7 @@
# -*- mode:python -*-
# Checks how many bugs in Bugzilla have the same hash.
#
-# Please do not run this script unless it's neccessary to do so.
+# Please do not run this script unless it's neccessary to do so.
# It forces Bugzilla to send data related to thousands of bug reports.
from bugzilla import RHBugzilla
diff --git a/scripts/abrt-bz-stats b/scripts/abrt-bz-stats
index d84fd55e..ea44f5bd 100755
--- a/scripts/abrt-bz-stats
+++ b/scripts/abrt-bz-stats
@@ -2,7 +2,7 @@
# -*- mode:python -*-
# ABRT Bugzilla Statistics script
#
-# Please do not run this script unless it's neccessary to do so.
+# Please do not run this script unless it's neccessary to do so.
# It forces Bugzilla to send info about thousands of bug reports.
from bugzilla import RHBugzilla
@@ -24,15 +24,15 @@ parser.add_option("-p", "--password", dest="password",
parser.add_option("-b", "--bugzilla", dest="bugzilla",
help="Bugzilla URL (defaults to Red Hat Bugzilla)", metavar="URL")
# Weekly stats shows the impact of changes in ABRT early.
-parser.add_option("-w", "--weekly", help="Generate weekly report instead of monthly",
+parser.add_option("-w", "--weekly", help="Generate weekly report instead of monthly",
action="store_true", default=False, dest="weekly")
# HTML output for blogs etc.
-parser.add_option("-t", "--html", help="Generate HTML output",
+parser.add_option("-t", "--html", help="Generate HTML output",
action="store_true", default=False, dest="html")
-parser.add_option("-i", "--wiki", help="Generate output in wiki syntax",
+parser.add_option("-i", "--wiki", help="Generate output in wiki syntax",
action="store_true", default=False, dest="wiki")
# Newest stats first
-parser.add_option("-r", "--reversed", help="Display the newest stats first",
+parser.add_option("-r", "--reversed", help="Display the newest stats first",
action="store_true", default=False, dest="reversed")
(options, args) = parser.parse_args()
if not options.user or len(options.user) == 0:
@@ -67,7 +67,7 @@ def save_to_cache():
global buginfos_loaded
f = open(CACHE_FILE, 'w')
pickle.dump(buginfos_loaded, f, 2)
- f.close()
+ f.close()
#
# Load data from Bugzilla
@@ -84,16 +84,16 @@ for buginfo in buginfos:
continue
# creation date, format YEAR-MONTH-DAY
- created = buginfo.creation_ts[0:10].replace(".", "-")
+ created = buginfo.creation_ts[0:10].replace(".", "-")
# last change to bug, format YEAR-MONTH-DAY
lastchange = buginfo.delta_ts[0:10].replace(".", "-")
status = buginfo.bug_status # status during the last change
if buginfo.resolution != "":
status += "_" + buginfo.resolution
buginfos_loaded[buginfo.bug_id] = {
- 'created':created,
- 'lastchange':lastchange,
- 'status':status,
+ 'created':created,
+ 'lastchange':lastchange,
+ 'status':status,
'component':buginfo.component}
bz.logout()
@@ -158,10 +158,10 @@ class TimeSpan:
if resolution in ["CLOSED_CURRENTRELEASE", "CLOSED_RAWHIDE", "CLOSED_ERRATA",
"CLOSED_UPSTREAM", "CLOSED_NEXTRELEASE"]:
self.closed_as_useful += 1
- elif resolution in ["CLOSED_DUPLICATE", "CLOSED_CANTFIX",
+ elif resolution in ["CLOSED_DUPLICATE", "CLOSED_CANTFIX",
"CLOSED_INSUFFICIENT_DATA"]:
self.closed_as_waste += 1
- elif resolution in ["CLOSED_NOTABUG", "CLOSED_WONTFIX",
+ elif resolution in ["CLOSED_NOTABUG", "CLOSED_WONTFIX",
"CLOSED_DEFERRED", "CLOSED_WORKSFORME"]:
self.closed_as_other += 1
diff --git a/scripts/check-bt-parsability b/scripts/check-bt-parsability
index a5018bfa..b154ad88 100755
--- a/scripts/check-bt-parsability
+++ b/scripts/check-bt-parsability
@@ -15,6 +15,6 @@ do
echo "-$file"
FAIL=$(($FAIL+1))
fi
-done
+done
echo ""
echo "Passed $PASS and failed $FAIL."