From 727fc7180de95558f4a0f326ac4149e5e6676545 Mon Sep 17 00:00:00 2001 From: Nils Date: Thu, 29 Mar 2018 08:41:32 +0200 Subject: [PATCH] better except --- plugins/currency/zcash/zcash_flypool_hashrate_ | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/plugins/currency/zcash/zcash_flypool_hashrate_ b/plugins/currency/zcash/zcash_flypool_hashrate_ index 390ec069..a9cba304 100755 --- a/plugins/currency/zcash/zcash_flypool_hashrate_ +++ b/plugins/currency/zcash/zcash_flypool_hashrate_ @@ -90,13 +90,13 @@ except ValueError: try: worker = mining_stats['data'] -except: +except (KeyError, TypeError): print("JSON result error!", file=sys.stderr) sys.exit(9) try: hash_rate = worker['currentHashrate'] -except: +except (KeyError, TypeError): print("No current Hashrate!", file=sys.stderr) sys.exit(9)