Use own mirror when SF is offline

This commit is contained in:
Ivan Kravets
2015-08-04 00:27:13 +03:00
parent 7d5a2c4dfc
commit 7e5c22706b

View File

@@ -89,7 +89,8 @@ class PackageManager(object):
dlpath = None dlpath = None
try: try:
dlpath = self.download(info['url'], pkg_dir, info['sha1']) dlpath = self.download(info['url'], pkg_dir, info['sha1'])
except requests.exceptions.ConnectionError: except (requests.exceptions.ConnectionError,
exception.FDUnrecognizedStatusCode):
if info['url'].startswith("http://sourceforge.net"): if info['url'].startswith("http://sourceforge.net"):
dlpath = self.download( dlpath = self.download(
"http://dl.platformio.org/packages/%s" % "http://dl.platformio.org/packages/%s" %