X-Git-Url: https://jfr.im/git/z_archive/twitter.git/blobdiff_plain/ce92ec7762914d9499be24d1730338ed1de7f642..b621300b6be21c7d07909b82c3f0319f546731e4:/twitter/api.py diff --git a/twitter/api.py b/twitter/api.py index 694d2c4..6271821 100644 --- a/twitter/api.py +++ b/twitter/api.py @@ -72,14 +72,16 @@ def wrap_response(response, headers): if response_typ is bool: # HURF DURF MY NAME IS PYTHON AND I CAN'T SUBCLASS bool. response_typ = int - class WrappedTwitterResponse(TwitterResponse, response_typ): + + class WrappedTwitterResponse(response_typ, TwitterResponse): __doc__ = TwitterResponse.__doc__ - def __init__(self, response, headers): - response_typ.__init__(self, response) + def __init__(self, response): + if response_typ is not int: + response_typ.__init__(self, response) TwitterResponse.__init__(self, headers) - return WrappedTwitterResponse(response, headers) + return WrappedTwitterResponse(response)