fix except order

This commit is contained in:
j 2016-02-20 23:55:06 +05:30
parent 408ab2432f
commit 0c0d87cadb

View file

@ -285,12 +285,12 @@ class Node(Thread):
except socks.GeneralProxyError: except socks.GeneralProxyError:
logger.debug('openurl failed %s', url) logger.debug('openurl failed %s', url)
return False return False
except:
logger.debug('openurl failed %s', url, exc_info=True)
return False
except urllib.error.URLError as e: except urllib.error.URLError as e:
logger.debug('openurl failed urllib2.URLError %s', e.reason) logger.debug('openurl failed urllib2.URLError %s', e.reason)
return False return False
except:
logger.debug('openurl failed %s', url, exc_info=True)
return False
if r.getcode() == 200: if r.getcode() == 200:
try: try:
fileobj = r fileobj = r