mirror of
https://github.com/Mikaela/Limnoria.git
synced 2024-12-24 03:33:11 +01:00
Fixed an uncaught exception in Debian.version.
This commit is contained in:
parent
f66c567355
commit
9d44399ed5
@ -193,9 +193,13 @@ class Debian(callbacks.Privmsg, plugins.PeriodicFileDownloader):
|
||||
package = urllib.quote(package)
|
||||
url = 'http://packages.debian.org/cgi-bin/search_packages.pl?keywords'\
|
||||
'=%s&searchon=names&version=%s&release=all' % (package, branch)
|
||||
fd = urllib2.urlopen(url)
|
||||
html = fd.read()
|
||||
fd.close()
|
||||
try:
|
||||
fd = urllib2.urlopen(url)
|
||||
html = fd.read()
|
||||
fd.close()
|
||||
except urllib2.HTTPError, e:
|
||||
irc.error(msg, 'I couldn\'t reach the search page (%s).' % e)
|
||||
return
|
||||
m = self._debnumpkgsre.search(html)
|
||||
if m:
|
||||
numberOfPackages = m.group(1)
|
||||
|
Loading…
Reference in New Issue
Block a user