also mention type on exception catch

This commit is contained in:
Tomáš Mládek 2019-05-15 11:28:36 +02:00
parent 6300ed6438
commit 6a660206c8

View file

@ -285,9 +285,9 @@ class DelojzaBot:
self.last_downloaded = filenames, hashtags, tumblr_ids
return filenames
except:
_, exc_value, __ = sys.exc_info()
exc_type, exc_value, __ = sys.exc_info()
if "Timed out" not in str(exc_value):
message.reply_text("Something is FUCKED: %s" % exc_value)
message.reply_text("Something is FUCKED: [{}] {}".format(exc_type, exc_value))
def tg_handle_url(self, _, update):
self.handle_urls(update.message, self.get_hashtags(update.message))