mirror of
https://github.com/munin-monitoring/contrib.git
synced 2025-07-22 02:51:03 +00:00
codecs.getreader ("utf-8") added again
without python3.4 fails
This commit is contained in:
parent
727fc7180d
commit
e2db693c0d
1 changed files with 3 additions and 1 deletions
|
@ -82,8 +82,10 @@ except IOError as exc:
|
||||||
print("Failed to request Flypool API: {}".format(exc), file=sys.stderr)
|
print("Failed to request Flypool API: {}".format(exc), file=sys.stderr)
|
||||||
sys.exit(9)
|
sys.exit(9)
|
||||||
|
|
||||||
|
reader = codecs.getreader("utf-8")
|
||||||
|
|
||||||
try:
|
try:
|
||||||
mining_stats = json.load(mining_stats_raw)
|
mining_stats = json.load(reader(mining_stats_raw))
|
||||||
except ValueError:
|
except ValueError:
|
||||||
print("Failed to parse JSON responce.", file=sys.stderr)
|
print("Failed to parse JSON responce.", file=sys.stderr)
|
||||||
sys.exit(9)
|
sys.exit(9)
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue