mirror of
https://github.com/Mikaela/Limnoria.git
synced 2024-11-23 11:09:23 +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)
|
package = urllib.quote(package)
|
||||||
url = 'http://packages.debian.org/cgi-bin/search_packages.pl?keywords'\
|
url = 'http://packages.debian.org/cgi-bin/search_packages.pl?keywords'\
|
||||||
'=%s&searchon=names&version=%s&release=all' % (package, branch)
|
'=%s&searchon=names&version=%s&release=all' % (package, branch)
|
||||||
fd = urllib2.urlopen(url)
|
try:
|
||||||
html = fd.read()
|
fd = urllib2.urlopen(url)
|
||||||
fd.close()
|
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)
|
m = self._debnumpkgsre.search(html)
|
||||||
if m:
|
if m:
|
||||||
numberOfPackages = m.group(1)
|
numberOfPackages = m.group(1)
|
||||||
|
Loading…
Reference in New Issue
Block a user