Readjusted to throw if Twython hasn't made a API call.

This commit is contained in:
devdave 2013-06-13 11:29:00 -05:00
parent 1e276778f6
commit 0f117ddbdf

View file

@ -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)