mirror of
https://github.com/platformio/platformio-core.git
synced 2025-07-29 17:47:14 +02:00
Fix platforms, packages, and libraries updating behind proxy // Resolve #1061
This commit is contained in:
@ -11,6 +11,8 @@ PlatformIO 3.0
|
||||
* Fixed "Super-Quick (Mac / Linux)" installer script
|
||||
(`issue #1017 <https://github.com/platformio/platformio-core/issues/1017>`_)
|
||||
* Fixed issue with "IOError" in VSCode when processing a project
|
||||
* Fixed platforms, packages, and libraries updating behind proxy
|
||||
(`issue #1061 <https://github.com/platformio/platformio-core/issues/1061>`_)
|
||||
|
||||
3.4.1 (2017-08-02)
|
||||
~~~~~~~~~~~~~~~~~~
|
||||
|
@ -18,7 +18,6 @@ import json
|
||||
import os
|
||||
import platform
|
||||
import re
|
||||
import socket
|
||||
import stat
|
||||
import subprocess
|
||||
import sys
|
||||
@ -582,12 +581,10 @@ def get_api_result(url, params=None, data=None, auth=None, cache_valid=None):
|
||||
"Please try later.")
|
||||
|
||||
|
||||
def internet_on(timeout=3):
|
||||
socket.setdefaulttimeout(timeout)
|
||||
for host in ("dl.bintray.com", "dl.platformio.org"):
|
||||
def internet_on():
|
||||
for url in ("http://dl.bintray.com", "http://dl.platformio.org"):
|
||||
try:
|
||||
socket.socket(socket.AF_INET, socket.SOCK_STREAM).connect((host,
|
||||
80))
|
||||
requests.get(url, timeout=3)
|
||||
return True
|
||||
except: # pylint: disable=bare-except
|
||||
pass
|
||||
|
Reference in New Issue
Block a user