From 0f117ddbdfca0825877488310f72f7b9df8dbfee Mon Sep 17 00:00:00 2001 From: devdave Date: Thu, 13 Jun 2013 11:29:00 -0500 Subject: [PATCH] Readjusted to throw if Twython hasn't made a API call. --- twython/twython.py | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/twython/twython.py b/twython/twython.py index 5409247..8f7db2e 100644 --- a/twython/twython.py +++ b/twython/twython.py @@ -245,11 +245,9 @@ 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 + raise TwythonError('This function must be called after an API call. It delivers header information.') + return self._last_call['headers'].get(header, default_return_value)