From 4ca1572283b8fc9791e5a33e0ddb620c72ca5c6d Mon Sep 17 00:00:00 2001 From: Tim Abbott Date: Wed, 14 Nov 2012 16:07:48 -0500 Subject: [PATCH] zephyr_mirror: Improve error handling getting public streams list. (imported from commit 06f9c00f19056bfe7db3c02955e3a29ad270de6e) --- bots/zephyr_mirror.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/bots/zephyr_mirror.py b/bots/zephyr_mirror.py index 70c99aa..55e71fa 100755 --- a/bots/zephyr_mirror.py +++ b/bots/zephyr_mirror.py @@ -133,7 +133,11 @@ def zephyr_bulk_subscribe(subs): def update_subscriptions_from_humbug(): try: res = humbug_client.get_public_streams() - streams = res["streams"] + if res.get("result") == "success": + streams = res["streams"] + else: + logger.error("Error getting public streams:\n%s" % res) + return except: logger.exception("Error getting public streams:") return