#!/usr/bin/python
-# bts -- manage bugs filed against ftp.debian.org
-#
-# Copyright 2009 Mike O'Connor <stew@vireo.org>
-#
+"""
+bts -- manage bugs filed against ftp.debian.org
+
+@contact: Debian FTP Master <ftpmaster@debian.org>
+@copyright: 2009 Mike O'Connor <stew@vireo.org>
+@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
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,