projects
/
tweepy.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
c6cfd97
)
Improve formatting in is_rate_limit_error_message function
author
Harmon
<Harmon758@gmail.com>
Sat, 26 Dec 2020 10:36:33 +0000
(
04:36
-0600)
committer
Harmon
<Harmon758@gmail.com>
Sat, 26 Dec 2020 10:36:33 +0000
(
04:36
-0600)
tweepy/error.py
patch
|
blob
|
blame
|
history
diff --git
a/tweepy/error.py
b/tweepy/error.py
index b9a3bb8c0929783d24c67eba85edd98ef3384d44..7a548d3e9201791ca9178f3f13285237cc3edd3d 100644
(file)
--- a/
tweepy/error.py
+++ b/
tweepy/error.py
@@
-20,10
+20,8
@@
class TweepError(Exception):
def is_rate_limit_error_message(message):
"""Check if the supplied error message belongs to a rate limit error."""
- return isinstance(message, list) \
- and len(message) > 0 \
- and 'code' in message[0] \
- and message[0]['code'] == 88
+ return (isinstance(message, list) and len(message) > 0 and
+ 'code' in message[0] and message[0]['code'] == 88)
class RateLimitError(TweepError):