X-Git-Url: https://git.decadent.org.uk/gitweb/?a=blobdiff_plain;f=dak%2Fbts_categorize.py;h=663690a1973d9e767c71147bba66dd9c44e50a1b;hb=231b2d37f118af2ebd15e039267f2953001b01d1;hp=1a4548e67c07d2766bcc7dfa60b6d0b68c629e36;hpb=b07b1b8a998812133d4ef5348da78a5f4b3b239f;p=dak.git diff --git a/dak/bts_categorize.py b/dak/bts_categorize.py index 1a4548e6..663690a1 100755 --- a/dak/bts_categorize.py +++ b/dak/bts_categorize.py @@ -1,9 +1,13 @@ #!/usr/bin/python -# bts -- manage bugs filed against ftp.debian.org -# -# Copyright 2009 Mike O'Connor -# +""" +bts -- manage bugs filed against ftp.debian.org + +@contact: Debian FTP Master +@copyright: 2009 Mike O'Connor +@license: GNU General Public License version 2 or later +""" + # This program is free software; you can redistribute it and/or modify it # under the terms of the GNU General Public License as published by the # Free Software Foundation; either version 2, or (at your option) any @@ -118,15 +122,16 @@ class BugClassifier(object): controls = "" bc = BugClassifier() - for bug in bc.unclassified_bugs(): - controls += bc.classify_bug(bug) - - return controls + try: + for bug in bc.unclassified_bugs(): + controls += bc.classify_bug(bug) -import smtplib -import email.Message + return controls + except: + log.error("couldn't retrieve bugs from soap interface: %s" % sys.exc_info()[0]) + return None -def send_email(commands, simulate): +def send_email(commands, simulate=False): global Cnf Subst = {'__COMMANDS__' : commands,