mirror of
https://github.com/platformio/platformio-core.git
synced 2025-07-30 10:07: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
|
* Fixed "Super-Quick (Mac / Linux)" installer script
|
||||||
(`issue #1017 <https://github.com/platformio/platformio-core/issues/1017>`_)
|
(`issue #1017 <https://github.com/platformio/platformio-core/issues/1017>`_)
|
||||||
* Fixed issue with "IOError" in VSCode when processing a project
|
* 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)
|
3.4.1 (2017-08-02)
|
||||||
~~~~~~~~~~~~~~~~~~
|
~~~~~~~~~~~~~~~~~~
|
||||||
|
@ -18,7 +18,6 @@ import json
|
|||||||
import os
|
import os
|
||||||
import platform
|
import platform
|
||||||
import re
|
import re
|
||||||
import socket
|
|
||||||
import stat
|
import stat
|
||||||
import subprocess
|
import subprocess
|
||||||
import sys
|
import sys
|
||||||
@ -582,12 +581,10 @@ def get_api_result(url, params=None, data=None, auth=None, cache_valid=None):
|
|||||||
"Please try later.")
|
"Please try later.")
|
||||||
|
|
||||||
|
|
||||||
def internet_on(timeout=3):
|
def internet_on():
|
||||||
socket.setdefaulttimeout(timeout)
|
for url in ("http://dl.bintray.com", "http://dl.platformio.org"):
|
||||||
for host in ("dl.bintray.com", "dl.platformio.org"):
|
|
||||||
try:
|
try:
|
||||||
socket.socket(socket.AF_INET, socket.SOCK_STREAM).connect((host,
|
requests.get(url, timeout=3)
|
||||||
80))
|
|
||||||
return True
|
return True
|
||||||
except: # pylint: disable=bare-except
|
except: # pylint: disable=bare-except
|
||||||
pass
|
pass
|
||||||
|
Reference in New Issue
Block a user