From 6302f0d645b7fb680ce5579e47cce166118804e0 Mon Sep 17 00:00:00 2001 From: Tommy Ip Date: Sun, 8 Jan 2017 15:52:26 +0000 Subject: [PATCH] bots: Fix bare except clause. --- bots/zephyr_mirror.py | 17 +++++++++-------- 1 file changed, 9 insertions(+), 8 deletions(-) diff --git a/bots/zephyr_mirror.py b/bots/zephyr_mirror.py index c1e52b8..f69762e 100755 --- a/bots/zephyr_mirror.py +++ b/bots/zephyr_mirror.py @@ -77,15 +77,16 @@ while backoff.keep_going(): print("Starting zephyr mirroring bot") try: subprocess.call(args) - except: + except Exception: traceback.print_exc() backoff.fail() -print("") -print("") -print("ERROR: The Zephyr mirroring bot is unable to continue mirroring Zephyrs.") -print("This is often caused by failing to maintain unexpired Kerberos tickets") -print("or AFS tokens. See https://zulip.com/zephyr for documentation on how to") -print("maintain unexpired Kerberos tickets and AFS tokens.") -print("") + +error_message = """ +ERROR: The Zephyr mirroring bot is unable to continue mirroring Zephyrs. +This is often caused by failing to maintain unexpired Kerberos tickets +or AFS tokens. See https://zulip.com/zephyr for documentation on how to +maintain unexpired Kerberos tickets and AFS tokens. +""" +print(error_message) sys.exit(1)