Skip to content

Commit

Permalink
hotfix of overlooked error #45.
Browse files Browse the repository at this point in the history
  • Loading branch information
MarcoHuebner authored and pmayd committed Sep 4, 2022
1 parent b46b3bb commit 225c8bd
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
2 changes: 2 additions & 0 deletions src/pygenesis/http_helper.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
"""Wrapper module for the data endpoint."""
import json
import warnings

import requests
Expand Down Expand Up @@ -70,6 +71,7 @@ def _check_invalid_destatis_status_code(response: requests.Response) -> None:
# catch possible errors raised by .json() (and only .json())
except (
UnicodeDecodeError,
json.decoder.JSONDecodeError,
requests.exceptions.JSONDecodeError,
):
response_dict = None
Expand Down
1 change: 0 additions & 1 deletion tests/unit_tests/test_http_helper.py
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,6 @@ def _generic_request_status(

# TODO: Why is specific (UTF-8) encoding necessary?
if status_response:

request_status._content = json.dumps(status_dict).encode("utf-8")
else:
request_status._content = response_text.encode("utf-8")
Expand Down

0 comments on commit 225c8bd

Please sign in to comment.