Readjusted to throw if Twython hasn't made a API call.
This commit is contained in:
parent
1e276778f6
commit
0f117ddbdf
1 changed files with 2 additions and 4 deletions
|
|
@ -245,10 +245,8 @@ class Twython(object):
|
|||
x-rate-limit-reset
|
||||
"""
|
||||
if self._last_call is None:
|
||||
if default_return_value is None:
|
||||
raise TwythonError('This function must be called after an API call. It delivers header information.')
|
||||
else:
|
||||
return default_return_value
|
||||
|
||||
|
||||
return self._last_call['headers'].get(header, default_return_value)
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue