X-Git-Url: https://git.decadent.org.uk/gitweb/?a=blobdiff_plain;f=dak%2Fbts_categorize.py;h=c8739af65618fa16ff2c569306f61a45e94dc975;hb=17c5cab4eb8d5181ec7a81267a4e2e6b43c0fc65;hp=10ec9fac935e3f52de7d0dfdb2a80fa5de200627;hpb=01496fe710b21e3922ef7b6f3ffa74f2b697b34d;p=dak.git diff --git a/dak/bts_categorize.py b/dak/bts_categorize.py index 10ec9fac..c8739af6 100755 --- a/dak/bts_categorize.py +++ b/dak/bts_categorize.py @@ -79,17 +79,12 @@ class BugClassifier(object): rm_re = re.compile( "^RM" ) dak_re = re.compile( "^\[dak\]" ) arch_re = re.compile( "^\[Architectures\]" ) + override_re = re.compile( "^override" ) classifiers = { rm_re: 'remove', dak_re: 'dak', - arch_re: 'archs'} - - def __init__( self ): - # Tolimar: I'm not really sure, what the following line used to to - # with btsutils, but I think it's not needed any more with - # debianbts - # self.bts.setUsers(['ftp.debian.org@packages.debian.org']) - + arch_re: 'archs', + override_re: 'override'} def unclassified_bugs(self): """ @@ -115,7 +110,7 @@ class BugClassifier(object): retval = "" for classifier in self.classifiers.keys(): - if classifier.match(bug.summary): + if classifier.match(bug.subject): retval = "usertag %s %s\n" % (bug.bug_num, self.classifiers[classifier]) break @@ -123,7 +118,7 @@ class BugClassifier(object): if retval: log.info(retval) else: - log.debug("Unmatched: [%s] %s" % (bug.bug_num, bug.summary)) + log.debug("Unmatched: [%s] %s" % (bug.bug_num, bug.subject)) return retval @@ -167,8 +162,8 @@ def main(): if not Cnf.has_key(opt): Cnf[opt] = "" - packages = apt_pkg.ParseCommandLine(Cnf, arguments, sys.argv) - Options = Cnf.SubTree('BtsCategorize::Options') + packages = apt_pkg.parse_commandline(Cnf, arguments, sys.argv) + Options = Cnf.subtree('BtsCategorize::Options') if Options["Help"]: usage()