Skip to content

Commit

Permalink
Remove deprecated encoding parameter to json.load for Python 3.9 comp…
Browse files Browse the repository at this point in the history
…atibility.
  • Loading branch information
tirkarthi authored and nikofil committed May 12, 2020
1 parent 4c70e4b commit 4831fd4
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion wad/clues.py
Expand Up @@ -49,7 +49,10 @@ def read_clues_from_file(filename):
raise

try:
clues = json.load(json_data, encoding='utf-8')
if six.PY2:
clues = json.load(json_data, encoding='utf-8')
else:
clues = json.load(json_data)
except ValueError as e:
logging.error("Error while reading JSON file, terminating: %s", tools.error_to_str(e))
raise
Expand Down

3 comments on commit 4831fd4

@fabaff
Copy link

@fabaff fabaff commented on 4831fd4 May 14, 2020

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Could you please publish a new release?

Would fix https://bugzilla.redhat.com/show_bug.cgi?id=1834183 without the need to add a patch to the spec file till 0.4.2 is out. Thanks

@nikofil
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sure, uploaded 0.4.2 to pypi.

@fabaff
Copy link

@fabaff fabaff commented on 4831fd4 May 16, 2020

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@nikofil, thank you.

Please sign in to comment.