Update Debian.bug for a slight website change.

This commit is contained in:
James Vega 2005-01-04 03:28:33 +00:00
parent e0887194f8
commit b11c4f1390
2 changed files with 6 additions and 2 deletions

View File

@ -312,7 +312,7 @@ class Debian(callbacks.Privmsg,
additional('glob', '*')])
_severity = re.compile(r'.*(?:severity set to `([^\']+)\'|'
r'severity:\s+([^\s]+))', re.I)
r'severity:\s+<em>([^<]+)</em>)', re.I)
_package = re.compile(r'Package: <[^>]+>([^<]+)<', re.I | re.S)
_reporter = re.compile(r'Reported by: <[^>]+>([^<]+)<', re.I | re.S)
_subject = re.compile(r'<br>([^<]+)</h1>', re.I | re.S)
@ -341,7 +341,8 @@ class Debian(callbacks.Privmsg,
if sev:
sev = filter(None, sev.groups())
if sev:
resp = '; '.join([resp, 'Severity: %s' % sev[0],
sev = utils.htmlToText(sev[0])
resp = '; '.join([resp, 'Severity: %s' % sev,
'<%s>' % url])
irc.reply(resp)
else:

View File

@ -58,6 +58,9 @@ class DebianTestCase(PluginTestCase):
except KeyboardInterrupt:
pass
def testDebBugNoHtml(self):
self.assertNotRegexp('debian bug 287792', r'\<em\>')
def testDebversion(self):
self.assertHelp('debian version')
self.assertRegexp('debian version lakjdfad',