From 408ab2432faae4fc92d6ab6357b1d46b3c54ab2f Mon Sep 17 00:00:00 2001 From: j Date: Sat, 20 Feb 2016 20:20:09 +0530 Subject: [PATCH] only print urlerror reason not traceback --- oml/nodes.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/oml/nodes.py b/oml/nodes.py index ae975a3..b23876a 100644 --- a/oml/nodes.py +++ b/oml/nodes.py @@ -288,6 +288,9 @@ class Node(Thread): except: logger.debug('openurl failed %s', url, exc_info=True) return False + except urllib.error.URLError as e: + logger.debug('openurl failed urllib2.URLError %s', e.reason) + return False if r.getcode() == 200: try: fileobj = r