Skip to content
Snippets Groups Projects
Commit fe8e3589 authored by roadscape's avatar roadscape
Browse files

ujson in httpclient, lint conf

parent b003798e
No related branches found
No related tags found
No related merge requests found
......@@ -2,12 +2,12 @@
"""Simple HTTP client for communicating with jussi/steem."""
from concurrent.futures import ThreadPoolExecutor, as_completed
import json
import logging
import socket
from functools import partial
from itertools import cycle
from time import sleep, perf_counter as perf
import ujson as json
import certifi
import urllib3
......@@ -28,8 +28,8 @@ def validated_json_payload(response):
try:
data = response.data.decode('utf-8')
payload = json.loads(data)
except json.decoder.JSONDecodeError:
raise Exception("invalid JSON: %s", data[0:1024])
except Exception as e:
raise Exception("JSON error %s: %s", str(e), data[0:1024])
return payload
......
......@@ -32,7 +32,7 @@ unsafe-load-any-extension=no
# A comma-separated list of package or module names from where C extensions may
# be loaded. Extensions are loading into the active Python interpreter and may
# run arbitrary code
extension-pkg-whitelist=
extension-pkg-whitelist=ujson
# Allow optimization of some AST trees. This will activate a peephole AST
# optimizer, which will apply various small optimizations. For instance, it can
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment