YAPF 0.27.0

This commit is contained in:
Ivan Kravets
2019-05-30 23:42:15 +03:00
parent 1598c8197e
commit 61db0f1d6a
44 changed files with 920 additions and 1000 deletions

View File

@@ -60,8 +60,9 @@ def is_twitter_blocked():
timeout = 2
try:
if os.getenv("HTTP_PROXY", os.getenv("HTTPS_PROXY")):
requests.get(
"http://%s" % ip, allow_redirects=False, timeout=timeout)
requests.get("http://%s" % ip,
allow_redirects=False,
timeout=timeout)
else:
socket.socket(socket.AF_INET, socket.SOCK_STREAM).connect((ip, 80))
return False