zephyr_mirror: Improve error handling getting public streams list.

(imported from commit 06f9c00f19056bfe7db3c02955e3a29ad270de6e)
This commit is contained in:
Tim Abbott 2012-11-14 16:07:48 -05:00
parent 56c6d93e8a
commit a11a4dceb7
1 changed files with 5 additions and 1 deletions

View File

@ -133,7 +133,11 @@ def zephyr_bulk_subscribe(subs):
def update_subscriptions_from_humbug(): def update_subscriptions_from_humbug():
try: try:
res = humbug_client.get_public_streams() 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: except:
logger.exception("Error getting public streams:") logger.exception("Error getting public streams:")
return return