mirror of
https://github.com/Mikaela/Limnoria.git
synced 2024-11-23 11:09:23 +01:00
Fixed handling of timeout on socket in Debian.version.
This commit is contained in:
parent
cdda36f9fb
commit
10fe799033
@ -40,6 +40,7 @@ import gzip
|
||||
import sets
|
||||
import getopt
|
||||
import popen2
|
||||
import socket
|
||||
import urllib
|
||||
import fnmatch
|
||||
import os.path
|
||||
@ -200,6 +201,12 @@ class Debian(callbacks.Privmsg, plugins.PeriodicFileDownloader):
|
||||
except urllib2.HTTPError, e:
|
||||
irc.error(msg, 'I couldn\'t reach the search page (%s).' % e)
|
||||
return
|
||||
except socket.error, e:
|
||||
if e.args[0] == 110:
|
||||
irc.error(msg, 'Connection timed out to packages.debian.org.')
|
||||
return
|
||||
else:
|
||||
raise
|
||||
m = self._debnumpkgsre.search(html)
|
||||
if m:
|
||||
numberOfPackages = m.group(1)
|
||||
|
Loading…
Reference in New Issue
Block a user