From 31694d8433399810a5bf6fe0ae39d115da351dd9 Mon Sep 17 00:00:00 2001 From: Harmon Date: Tue, 6 Apr 2021 13:07:08 -0500 Subject: [PATCH] Default proxy to None for API initialization --- tweepy/api.py | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) 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 -- 2.25.1