From 738149c9bfb9965d013d01ef99f9bb1c2819e7e8 Mon Sep 17 00:00:00 2001 From: Luca Falavigna Date: Tue, 15 Jun 2010 14:28:22 +0000 Subject: Imported Upstream version 2.0.0 --- bin/sfsum | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) (limited to 'bin/sfsum') 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) -- cgit v1.2.3