* hugdaylist: apply quick fix to not crash.

This commit is contained in:
Daniel Holbach 2007-09-24 09:50:48 +02:00
parent d61c07aeec
commit a8dd716512
2 changed files with 13 additions and 4 deletions

6
debian/changelog vendored
View File

@ -1,3 +1,9 @@
ubuntu-dev-tools (0.12) gutsy; urgency=low
* hugdaylist: apply quick fix to not crash.
-- Daniel Holbach <daniel.holbach@ubuntu.com> Mon, 24 Sep 2007 09:43:30 +0200
ubuntu-dev-tools (0.11) gutsy; urgency=low
[ Daniel Holbach ]

View File

@ -18,6 +18,8 @@ import string
try:
import launchpadbugs.connector as Connector
BugList = Connector.ConnectBugList()
Bug = Connector.ConnectBug()
except:
print >> sys.stderr, \
"You need python-launchpad-bugs (>= 0.2.9) installed to use hugdaylist."
@ -44,17 +46,18 @@ def check_args():
def filter_unsolved(bugs):
result = set()
for b in bugs:
if b.status != 'Fix Committed' and \
'ubuntu-main-sponsors' not in [str(s) for s in b.subscribers] and \
'ubuntu-universe-sponsors' not in [str(s) for s in b.subscribers]:
bug = Bug(int(b))
if bug.status != 'Fix Committed' and \
'ubuntu-main-sponsors' not in [str(s) for s in bug.subscribers] and \
'ubuntu-universe-sponsors' not in [str(s) for s in bug.subscribers]:
result.add(b)
return result
def main():
(howmany, url) = check_args()
BugList = Connector.ConnectBugList()
l = BugList(url).filter(func=[filter_unsolved])
if not l.bugs: