Skip to content

Commit

Permalink
fix for linux
Browse files Browse the repository at this point in the history
Cedric Halbronn committed Nov 6, 2017
1 parent 0c8ab9a commit 35e69b6
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion helper.py
Original file line number Diff line number Diff line change
@@ -123,7 +123,8 @@ def load_targets(targetdb):
attempts = 0
while attempts < max_attempts:
try:
with open(targetdb, "rb") as tmp:
# we avoid "rb" as the JSON object must be str, not bytes
with open(targetdb, "r") as tmp:
targets = json.loads(tmp.read())
except ValueError:
print("[helper] Failed to read valid JSON, trying again in 1 sec")

0 comments on commit 35e69b6

Please sign in to comment.