diff options
Diffstat (limited to 'bin/sfsum')
-rw-r--r-- | bin/sfsum | 9 |
1 files changed, 4 insertions, 5 deletions
@@ -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) |