Suppress intentional Exception log from self.reset().

This commit is contained in:
Arun Prakash Jana 2016-04-10 10:37:16 +05:30
parent 116eb44224
commit 7bde1f7ec6
No known key found for this signature in database
GPG Key ID: C0A712ED95043DCB

3
buku
View File

@ -256,7 +256,8 @@ def getTitleData(resp):
else:
parser.feed(data.decode(charset))
except Exception as e:
if debug:
if debug and str(e) != "we should not get here!":
# Suppress Exception due to intentional self.reset() in HTMLParser
print("\x1b[1mEXCEPTION\x1b[21m [getTitleData]: (%s) %s" % (type(e).__name__, e))