OAUTH_ROOT = '/oauth/'
def __init__(self, consumer_key, consumer_secret, callback=None):
+ if not isinstance(consumer_key, (str, bytes)):
+ raise TypeError("Consumer key must be string or bytes, not "
+ + type(consumer_key).__name__)
+ if not isinstance(consumer_secret, (str, bytes)):
+ raise TypeError("Consumer secret must be string or bytes, not "
+ + type(consumer_secret).__name__)
+
self.consumer_key = consumer_key
self.consumer_secret = consumer_secret
self.access_token = None