Skip to content

Commit

Permalink
Default proxy to None for API initialization
Browse files Browse the repository at this point in the history
  • Loading branch information
Harmon758 committed Apr 6, 2021
1 parent da2f276 commit 31694d8
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions tweepy/api.py
Original file line number Diff line number Diff line change
Expand Up @@ -74,16 +74,18 @@ class API:
"""

def __init__(self, auth_handler=None, *, cache=None,
host='api.twitter.com', parser=ModelParser(), proxy='',
host='api.twitter.com', parser=ModelParser(), proxy=None,
retry_count=0, retry_delay=0, retry_errors=None, timeout=60,
upload_host='upload.twitter.com', wait_on_rate_limit=False):
self.auth = auth_handler
self.cache = cache
self.host = host
self.parser = parser

self.proxy = {}
if proxy:
if proxy is not None:
self.proxy['https'] = proxy

self.retry_count = retry_count
self.retry_delay = retry_delay
self.retry_errors = retry_errors
Expand Down

0 comments on commit 31694d8

Please sign in to comment.