projects
/
tweepy.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
311b32f
)
Replace type equality check in OAuthHandler initialization
author
Harmon
<Harmon758@gmail.com>
Sun, 27 Dec 2020 22:53:30 +0000
(16:53 -0600)
committer
Harmon
<Harmon758@gmail.com>
Sun, 27 Dec 2020 22:54:44 +0000
(16:54 -0600)
With isinstance usage
tweepy/auth.py
patch
|
blob
|
blame
|
history
diff --git
a/tweepy/auth.py
b/tweepy/auth.py
index 7e82b407480a88f2a41bf740fc6b698537d11065..3cd7efa886272cc920aeac5c8df7b30c13d39433 100644
(file)
--- a/
tweepy/auth.py
+++ b/
tweepy/auth.py
@@
-36,10
+36,10
@@
class OAuthHandler(AuthHandler):
OAUTH_ROOT = '/oauth/'
def __init__(self, consumer_key, consumer_secret, callback=None):
- if
type(consumer_key) == str
:
+ if
isinstance(consumer_key, str)
:
consumer_key = consumer_key.encode('ascii')
- if
type(consumer_secret) == str
:
+ if
isinstance(consumer_secret, str)
:
consumer_secret = consumer_secret.encode('ascii')
self.consumer_key = consumer_key