From: Harmon Date: Tue, 6 Apr 2021 18:07:08 +0000 (-0500) Subject: Default proxy to None for API initialization X-Git-Url: https://vcs.fsf.org/?a=commitdiff_plain;h=31694d8433399810a5bf6fe0ae39d115da351dd9;p=tweepy.git Default proxy to None for API initialization --- diff --git a/tweepy/api.py b/tweepy/api.py index 1a52d8a..a6652fa 100644 --- a/tweepy/api.py +++ b/tweepy/api.py @@ -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