From c466adc4d335d9b8adf24646fc557f64976a5ba1 Mon Sep 17 00:00:00 2001 From: Lars Kruse Date: Wed, 14 Aug 2019 00:29:25 +0200 Subject: [PATCH] Plugin ethermine_hashrate_: fix code style issues reported by flake8 --- plugins/currency/ethereum/ethermine_hashrate_ | 9 +++++---- t/test-exception-wrapper.expected-failures | 1 - 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/plugins/currency/ethereum/ethermine_hashrate_ b/plugins/currency/ethereum/ethermine_hashrate_ index 4b640409..550743b8 100755 --- a/plugins/currency/ethereum/ethermine_hashrate_ +++ b/plugins/currency/ethereum/ethermine_hashrate_ @@ -20,8 +20,8 @@ ethermine_hashrate__ =head1 INTERPRETATION -This plugin shows the ethermine.org mining pool hashrate (MH/s) of a given ethereum address and rig name. -Hashrate is queried via ethermine.org API L. +This plugin shows the ethermine.org mining pool hashrate (MH/s) of a given ethereum address and rig +name. Hashrate is queried via ethermine.org API L. =head1 VERSION @@ -102,11 +102,12 @@ except ValueError: try: workers = mining_stats['workers'] -except: +except KeyError: print("JSON result error!", file=sys.stderr) sys.exit(9) -# ethermine.org sometimes has caching errors. You can see data from other miner. Always check your rig name. +# ethermine.org sometimes has caching errors. You can see data from other miner. Always check your +# rig name. for worker in workers: if workers[worker]['worker'] == miner: hash_rate = workers[worker]['hashrate'] diff --git a/t/test-exception-wrapper.expected-failures b/t/test-exception-wrapper.expected-failures index 3c347618..cd0d0d11 100644 --- a/t/test-exception-wrapper.expected-failures +++ b/t/test-exception-wrapper.expected-failures @@ -60,7 +60,6 @@ plugins/cpu/process_count plugins/cpu/process_cpushare plugins/currency/bitcoin/slush_hashrate_ plugins/currency/bitcoin/slush_reward_ -plugins/currency/ethereum/ethermine_hashrate_ plugins/currency/nanopool/nanopool_ plugins/currency/zcash/zcash_flypool_hashrate_ plugins/cyrus/cyrus-imapd