From e2db693c0da7d55dcb8a6b3f7a6021293e6ae138 Mon Sep 17 00:00:00 2001 From: Nils Date: Thu, 29 Mar 2018 08:50:21 +0200 Subject: [PATCH] codecs.getreader ("utf-8") added again without python3.4 fails --- plugins/currency/zcash/zcash_flypool_hashrate_ | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/plugins/currency/zcash/zcash_flypool_hashrate_ b/plugins/currency/zcash/zcash_flypool_hashrate_ index a9cba304..609c1aa9 100755 --- a/plugins/currency/zcash/zcash_flypool_hashrate_ +++ b/plugins/currency/zcash/zcash_flypool_hashrate_ @@ -82,8 +82,10 @@ except IOError as exc: print("Failed to request Flypool API: {}".format(exc), file=sys.stderr) sys.exit(9) +reader = codecs.getreader("utf-8") + try: - mining_stats = json.load(mining_stats_raw) + mining_stats = json.load(reader(mining_stats_raw)) except ValueError: print("Failed to parse JSON responce.", file=sys.stderr) sys.exit(9)