From ba530e2341d3941d31a6d1ea009c618ac6760a5a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Robert=20H=C3=B6nig?= Date: Thu, 4 Jan 2018 12:19:29 +0100 Subject: [PATCH] giphy bot: Use bot_handler.quit(). --- zulip_bots/zulip_bots/bots/giphy/giphy.py | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/zulip_bots/zulip_bots/bots/giphy/giphy.py b/zulip_bots/zulip_bots/bots/giphy/giphy.py index 8a3369b..f4208ad 100644 --- a/zulip_bots/zulip_bots/bots/giphy/giphy.py +++ b/zulip_bots/zulip_bots/bots/giphy/giphy.py @@ -32,9 +32,8 @@ class GiphyHandler(object): data = requests.get(GIPHY_TRANSLATE_API, params=query) except HTTPError as e: if (e.response.json()['error']['errors'][0]['reason'] == 'keyInvalid'): - logging.error('Invalid key.' - 'Follow the instructions in doc.md for setting API key.') - sys.exit(1) + bot_handler.quit('Invalid key.' + 'Follow the instructions in doc.md for setting API key.') else: raise except ConnectionError: