From fc706eafe0bc4c6163589c4bd6ea14e47c08854b Mon Sep 17 00:00:00 2001 From: Jonathan Davies Date: Wed, 21 Jan 2009 10:50:26 +0000 Subject: [PATCH] ubuntutools/lp/libsupport.py: Added glob to imports. --- grab-attachments | 3 +++ ubuntutools/lp/libsupport.py | 1 + 2 files changed, 4 insertions(+) diff --git a/grab-attachments b/grab-attachments index 57f8d66..9c99056 100755 --- a/grab-attachments +++ b/grab-attachments @@ -32,6 +32,7 @@ def main(): if sys.argv[1] in ["--help", "-h"]: print USAGE sys.exit(0) + launchpad = get_launchpad("ubuntu-dev-tools") for arg in sys.argv[1:]: try: @@ -39,7 +40,9 @@ def main(): except: print >> sys.stderr, "'%s' is not a valid bug number." % arg sys.exit(1) + b = launchpad.bugs[number] + for a in b.attachments: f = a.data.open() filename = os.path.join(os.getcwd(), f.filename) diff --git a/ubuntutools/lp/libsupport.py b/ubuntutools/lp/libsupport.py index 7f35d3a..9e15f53 100644 --- a/ubuntutools/lp/libsupport.py +++ b/ubuntutools/lp/libsupport.py @@ -19,6 +19,7 @@ # # Modules. +import glob import os import urllib import urlparse