From e8ce24d57fa1a93511565ea8ef173cff23353b30 Mon Sep 17 00:00:00 2001 From: Stefan Ritter Date: Wed, 28 Oct 2009 15:51:41 +0100 Subject: Code cleanup --- wnpp-query.py | 17 +++++++++-------- 1 file changed, 9 insertions(+), 8 deletions(-) diff --git a/wnpp-query.py b/wnpp-query.py index 0b7e626..704e282 100755 --- a/wnpp-query.py +++ b/wnpp-query.py @@ -28,15 +28,15 @@ if not options.min_days_old and not options.max_days_old or not options.itp and if not options.min_days_old: options.min_days_old = 0 if not options.max_days_old: options.max_days_old = 9999 -reports = [] -item = [] - if options.itp: url = urllib2.urlopen('http://www.debian.org/devel/wnpp/being_packaged') else: url = urllib2.urlopen('http://www.debian.org/devel/wnpp/requested') +reports = [] +item = [] + for line in url: - if re.findall('bugs\.debian\.org', line) \ + if re.match('^(.*)bugs\.debian\.org(.*)$', line) \ or re.match('^requested(.*)$', line) \ or re.match('^in preparation since(.*)$', line) \ or re.match('^(.*)days in preparation\.$', line): @@ -44,19 +44,20 @@ for line in url: if re.match('^\(.*),', line) \ or re.match ('^ \\,', line): - link = re.sub('