Commit acf56a3b authored by Saul Ibarra's avatar Saul Ibarra

Capture ConnectionLost when downloading icon

parent f7e3befd
...@@ -19,6 +19,7 @@ from dateutil.tz import tzutc ...@@ -19,6 +19,7 @@ from dateutil.tz import tzutc
from eventlib.green import urllib2 from eventlib.green import urllib2
from itertools import chain from itertools import chain
from twisted.internet import reactor from twisted.internet import reactor
from twisted.internet.error import ConnectionLost
from zope.interface import implements from zope.interface import implements
from sipsimple import addressbook from sipsimple import addressbook
...@@ -346,7 +347,7 @@ class PresenceSubscriptionHandler(object): ...@@ -346,7 +347,7 @@ class PresenceSubscriptionHandler(object):
response = urllib2.urlopen(req) response = urllib2.urlopen(req)
content = response.read() content = response.read()
info = response.info() info = response.info()
except (urllib2.HTTPError, urllib2.URLError): except (ConnectionLost, urllib2.HTTPError, urllib2.URLError):
return None, None return None, None
content_type = info.getheader('content-type') content_type = info.getheader('content-type')
etag = info.getheader('etag') etag = info.getheader('etag')
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment