projects
/
tweepy.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
0cd96b1
)
Handle empty payloads in JSONParser.parse
author
Harmon
<Harmon758@gmail.com>
Mon, 30 Jan 2023 18:49:11 +0000
(12:49 -0600)
committer
Harmon
<Harmon758@gmail.com>
Mon, 30 Jan 2023 18:51:07 +0000
(12:51 -0600)
Resolves #2051
tweepy/parsers.py
patch
|
blob
|
blame
|
history
diff --git
a/tweepy/parsers.py
b/tweepy/parsers.py
index a6ca97d02f14f5856c33db5641717ca38a293f50..2aee1a5e4d05596dc29111f006e3fd26592dda50 100644
(file)
--- a/
tweepy/parsers.py
+++ b/
tweepy/parsers.py
@@
-33,6
+33,9
@@
class JSONParser(Parser):
payload_format = 'json'
def parse(self, payload, *, return_cursors=False, **kwargs):
+ if not payload:
+ return
+
try:
json = json_lib.loads(payload)
except Exception as e: