X-Git-Url: https://git.kaliko.me/?a=blobdiff_plain;f=sid%2Fbts.py;h=254a923cd4afa1658405fa0e984cc20bb99ee499;hb=685ca532c5f30b41da003878cbfca8183b4965b7;hp=efe703356e4e9fb9fb63774fee312d9061699fb1;hpb=05082f879f25814b1b9e951b0b9141252f4f0b2d;p=sid.git diff --git a/sid/bts.py b/sid/bts.py index efe7033..254a923 100644 --- a/sid/bts.py +++ b/sid/bts.py @@ -24,13 +24,16 @@ from .plugin import Plugin, botcmd class Bugs(Plugin): - re_bugs = re_compile('(?<=#)(\d{6,7})') + """Gets bugs info from the BTS + """ + re_bugs = re_compile(r'(?<=#)(\d{6,7})') def __init__(self, bot): Plugin.__init__(self, bot) bot.add_event_handler("muc::%s::message" % self.bot.room, self.muc_message) def muc_message(self, msg): + """Handler method dealing with MUC incoming messages""" # Does not reply to myself if msg['mucnick'] == self.bot.nick: return @@ -38,7 +41,7 @@ class Bugs(Plugin): return bugs = list() for bug_id in set(Bugs.re_bugs.findall(msg['body'].strip())): - self.log.debug('got bug id: %s' % bug_id) + self.log.debug('got bug id: %s', bug_id) query = debianbts.get_status(bug_id) if len(query) == 1: bug = query[0]