python: Fix remaining bare excepts in codebase.

Fixes #2862.
This commit is contained in:
sinwar 2017-03-05 14:55:27 +05:30 committed by Tim Abbott
parent 58f5e729b6
commit 04580dbb97
2 changed files with 2 additions and 2 deletions

View file

@ -234,7 +234,7 @@ class ZulipToJabberBot(object):
self.stream_message(message) self.stream_message(message)
elif message['type'] == 'private': elif message['type'] == 'private':
self.private_message(message) self.private_message(message)
except: except Exception:
logging.exception("Exception forwarding Zulip => Jabber") logging.exception("Exception forwarding Zulip => Jabber")
elif event['type'] == 'subscription': elif event['type'] == 'subscription':
self.process_subscription(event) self.process_subscription(event)

View file

@ -195,6 +195,6 @@ for i in itertools.count():
if not i % 10: if not i % 10:
populate_events() populate_events()
send_reminders() send_reminders()
except: except Exception:
logging.exception("Couldn't download Google calendar and/or couldn't post to Zulip.") logging.exception("Couldn't download Google calendar and/or couldn't post to Zulip.")
time.sleep(60) time.sleep(60)