[PATCH] querybts mbox option manages several bugs
Carl Chenet
carl.chenet at ohmytux.com
Sat Jun 27 13:45:14 UTC 2009
---
bin/querybts | 25 +++++++++++++------------
1 files changed, 13 insertions(+), 12 deletions(-)
diff --git a/bin/querybts b/bin/querybts
index 67d0249..5f66f21 100755
--- a/bin/querybts
+++ b/bin/querybts
@@ -153,18 +153,19 @@ def main():
return
if mbox:
- m = re.match('^#?(\d+)$', args[0])
- if not m:
- print >> sys.stderr, "You must specify a bug number when using the --mbox option."
- sys.exit(1)
- num = int(m.group(1))
- url = debianbts.get_report_url(system, num, archived, mbox=True)
- try:
- report = urlutils.open_url(url)
- sys.stdout.write(report.read())
- except urlutils.urllib2.URLError, ex:
- print >> sys.stderr, "Error while accessing mbox report (%s)." % ex
- sys.exit(1)
+ for bugnum in args:
+ m = re.match('^#?(\d+)$', bugnum)
+ if not m:
+ print >> sys.stderr, "You must specify a bug number when using the --mbox option."
+ sys.exit(1)
+ num = int(m.group(1))
+ url = debianbts.get_report_url(system, num, archived, mbox=True)
+ try:
+ report = urlutils.open_url(url)
+ sys.stdout.write(report.read())
+ except urlutils.urllib2.URLError, ex:
+ print >> sys.stderr, "Error while accessing mbox report (%s)." % ex
+ sys.exit(1)
return
if interface:
--
1.5.4.3
--=-2iZK3EZn1pYmzyTv3cWI--
More information about the Reportbug-maint
mailing list