Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
H
hivemind
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Deploy
Releases
Package registry
Container Registry
Model registry
Operate
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
hive
hivemind
Commits
fe8e3589
Commit
fe8e3589
authored
6 years ago
by
roadscape
Browse files
Options
Downloads
Patches
Plain Diff
ujson in httpclient, lint conf
parent
b003798e
No related branches found
No related tags found
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
hive/steem/http_client.py
+3
-3
3 additions, 3 deletions
hive/steem/http_client.py
pylintrc
+1
-1
1 addition, 1 deletion
pylintrc
with
4 additions
and
4 deletions
hive/steem/http_client.py
+
3
−
3
View file @
fe8e3589
...
...
@@ -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
...
...
This diff is collapsed.
Click to expand it.
pylintrc
+
1
−
1
View file @
fe8e3589
...
...
@@ -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
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment