projects
/
tweepy.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
2dc3670
)
Only return cursors if needed.
author
Joshua Roesslein
<jroesslein@gmail.com>
Tue, 1 Nov 2011 04:05:31 +0000
(23:05 -0500)
committer
Joshua Roesslein
<jroesslein@gmail.com>
Tue, 1 Nov 2011 04:05:31 +0000
(23:05 -0500)
tweepy/parsers.py
patch
|
blob
|
blame
|
history
diff --git
a/tweepy/parsers.py
b/tweepy/parsers.py
index 1aa643e8451503e636bd7a46d08b42810e0f5743..cf66dacc4b64e084fbf445c0e65113f677cd42cd 100644
(file)
--- a/
tweepy/parsers.py
+++ b/
tweepy/parsers.py
@@
-39,7
+39,8
@@
class JSONParser(Parser):
except Exception, e:
raise TweepError('Failed to parse JSON payload: %s' % e)
- if isinstance(json, dict) and 'previous_cursor' in json and 'next_cursor' in json:
+ needsCursors = method.parameters.has_key('cursor')
+ if needsCursors and isinstance(json, dict) and 'previous_cursor' in json and 'next_cursor' in json:
cursors = json['previous_cursor'], json['next_cursor']
return json, cursors
else: