Projet

Général

Profil

Révision 6a0a0c8d

ID6a0a0c8d58544ec2969282df4e31bde5f78ce137
Parent 6ff34af5
Enfant c5774e62

Ajouté par Nils il y a plus de 7 ans

use json.loadS

Voir les différences:

plugins/currency/zcash/zcash_flypool_hashrate_
82 82
    print("Failed to request Flypool API: {}".format(exc), file=sys.stderr)
83 83
    sys.exit(9)
84 84

  
85
# manage codec and error handling lookup process
86
reader = codecs.getreader("utf-8")
87

  
88 85
hash_rate = "U"
89 86

  
90 87
try:
91
    mining_stats = json.load(reader(mining_stats_raw))
88
    mining_stats = json.loads(mining_stats_raw.read().decode("utf-8"))
92 89
except ValueError:
93 90
    print("Failed to parse JSON responce.", file=sys.stderr)
94 91
else:

Formats disponibles : Unified diff