From 21341b5a00facd4c5e4212c8e1050cc398b5a569 Mon Sep 17 00:00:00 2001 From: Nils Date: Thu, 29 Mar 2018 08:11:59 +0200 Subject: [PATCH] python3 only --- .../currency/zcash/zcash_flypool_hashrate_ | 19 +++++-------------- 1 file changed, 5 insertions(+), 14 deletions(-) diff --git a/plugins/currency/zcash/zcash_flypool_hashrate_ b/plugins/currency/zcash/zcash_flypool_hashrate_ index d11fb7fb..fbcd4c10 100755 --- a/plugins/currency/zcash/zcash_flypool_hashrate_ +++ b/plugins/currency/zcash/zcash_flypool_hashrate_ @@ -1,4 +1,4 @@ -#!/usr/bin/env python +#!/usr/bin/env python3 """ =head1 NAME @@ -7,7 +7,7 @@ zcash_flypool_hashrate_ - Munin plugin to monitor your zcash.flypool.org hashrat =head1 APPLICABLE SYSTEMS -All systems with "python" and "munin" +All systems with "python3" and "munin" =head1 CONFIGURATION @@ -42,20 +42,11 @@ GPLv2 =cut """ -from __future__ import print_function - import sys import json import codecs - -try: - # python3 - from urllib.request import urlopen - from urllib.request import Request -except ImportError: - # python2 - from urllib2 import urlopen - from urllib2 import Request +from urllib.request import urlopen +from urllib.request import Request command = '' if len(sys.argv) > 1: @@ -110,4 +101,4 @@ except: print("No current Hashrate!", file=sys.stderr) sys.exit(9) -print("flypool_hs_{}_{}.value {}".format(zcash_address, miner, hash_rate)) \ No newline at end of file +print("flypool_hs_{}_{}.value {}".format(zcash_address, miner, hash_rate))