summaryrefslogtreecommitdiff
path: root/bin/sfsum
diff options
context:
space:
mode:
authorLuca Falavigna <dktrkranz@debian.org>2010-06-15 14:28:22 +0000
committerLuca Falavigna <dktrkranz@debian.org>2010-06-15 14:28:22 +0000
commit738149c9bfb9965d013d01ef99f9bb1c2819e7e8 (patch)
tree0397d9bf3b12c903dc73419585df231397ff343c /bin/sfsum
parente7885e3af440eaef38a9301fd92a105afc8ddebb (diff)
Imported Upstream version 2.0.0upstream/2.0.0
Diffstat (limited to 'bin/sfsum')
-rw-r--r--bin/sfsum9
1 files changed, 4 insertions, 5 deletions
diff --git a/bin/sfsum b/bin/sfsum
index a560b7d..2dfa422 100644
--- a/bin/sfsum
+++ b/bin/sfsum
@@ -25,7 +25,6 @@
import xml.sax
import xml.sax.saxutils
-import string
import sys
SFName = {
@@ -42,7 +41,7 @@ SFName = {
'Christoph Wiedemann' : 'wiedeman',
}
-class Artifact:
+class Artifact(object):
"""Just a place to hold attributes that we find in the XML."""
pass
@@ -51,7 +50,7 @@ Artifacts = {}
def nws(text):
"""Normalize white space. This will become important if/when
we enhance this to search for arbitrary fields."""
- return string.join(string.split(text), ' ')
+ return ' '.join(text.split())
class ClassifyArtifacts(xml.sax.saxutils.DefaultHandler):
"""
@@ -120,9 +119,9 @@ if __name__ == '__main__':
# Hard-coded search for 'Open' bugs. This should be easily
# generalized once we figure out other things for this script to do.
- bugs = filter(lambda x: x.status == 'Open', Artifacts['Bugs'])
+ bugs = [x for x in Artifacts['Bugs'] if x.status == 'Open']
- print Artifacts.keys()
+ print list(Artifacts.keys())
print "%d open bugs" % len(bugs)