projects
/
tweepy.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
5e15e2a
)
Handle simplejson being installed when handling JSONDecodeError
author
Harmon
<Harmon758@gmail.com>
Wed, 29 Sep 2021 15:02:07 +0000
(10:02 -0500)
committer
Harmon
<Harmon758@gmail.com>
Wed, 29 Sep 2021 15:02:07 +0000
(10:02 -0500)
tweepy/errors.py
patch
|
blob
|
blame
|
history
diff --git
a/tweepy/errors.py
b/tweepy/errors.py
index e258c6af9bb1a8bcb72fac24f8ab3456b1dffa6f..fad1cbf9c0c84c4e52a2e3072b694139a184d915 100644
(file)
--- a/
tweepy/errors.py
+++ b/
tweepy/errors.py
@@
-2,7
+2,12
@@
# Copyright 2009-2021 Joshua Roesslein
# See LICENSE for details.
-import json
+try:
+ # Handle https://github.com/psf/requests/issues/5794 until requests 2.27.0
+ # is released with https://github.com/psf/requests/pull/5856
+ import simplejson as json
+except ImportError:
+ import json
class TweepyException(Exception):