only print urlerror reason not traceback

This commit is contained in:
j 2016-02-20 20:20:09 +05:30
parent cf3762dd7f
commit 408ab2432f

View file

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