Remove unnecessary ASCII encoding of credentials in OAuthHandler
authorHarmon <Harmon758@gmail.com>
Wed, 30 Dec 2020 06:00:12 +0000 (00:00 -0600)
committerHarmon <Harmon758@gmail.com>
Wed, 30 Dec 2020 06:00:12 +0000 (00:00 -0600)
tweepy/auth.py

index f27f5da83b43f109e41c377a102ea74dbabdc7c8..1d138bdc729bf42355df117882dd340f733677bf 100644 (file)
@@ -36,12 +36,6 @@ class OAuthHandler(AuthHandler):
     OAUTH_ROOT = '/oauth/'
 
     def __init__(self, consumer_key, consumer_secret, callback=None):
-        if isinstance(consumer_key, str):
-            consumer_key = consumer_key.encode('ascii')
-
-        if isinstance(consumer_secret, str):
-            consumer_secret = consumer_secret.encode('ascii')
-
         self.consumer_key = consumer_key
         self.consumer_secret = consumer_secret
         self.access_token = None