From e82f6e0da84ba49473cfd9558d359b1ae770ea0b Mon Sep 17 00:00:00 2001 From: Janne Sinivirta Date: Sun, 27 Aug 2017 15:47:09 +0300 Subject: [PATCH] fix using JSONDecodeError in two different ways --- main.py | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/main.py b/main.py index 6ed2e8319..9245ed11b 100755 --- a/main.py +++ b/main.py @@ -1,5 +1,4 @@ #!/usr/bin/env python -import json import logging import threading import time @@ -70,7 +69,7 @@ class TradeThread(threading.Thread): finally: Session.flush() time.sleep(25) - except (RuntimeError, json.decoder.JSONDecodeError) as e: + except (RuntimeError, JSONDecodeError) as e: TelegramHandler.send_msg('*Status:* Got RuntimeError: ```\n{}\n```'.format(traceback.format_exc())) logger.exception('RuntimeError. Stopping trader ...') finally: