Disable SSL Server-Name-Indication for Python < 2.7.9

This commit is contained in:
Ivan Kravets
2016-09-08 13:50:45 +03:00
parent dab4c91c98
commit df4560412d
4 changed files with 11 additions and 5 deletions

View File

@ -4,6 +4,11 @@ Release Notes
PlatformIO 3.0
--------------
3.0.2 (2016-09-??)
~~~~~~~~~~~~~~~~~~
* Disable SSL Server-Name-Indication for Python < 2.7.9
3.0.1 (2016-09-08)
~~~~~~~~~~~~~~~~~~

View File

@ -14,7 +14,7 @@
import sys
VERSION = (3, 0, 1)
VERSION = (3, 0, "2a1")
__version__ = ".".join([str(s) for s in VERSION])
__title__ = "platformio"

View File

@ -14,6 +14,7 @@
import hashlib
import json
import sys
import uuid
from copy import deepcopy
from os import environ, getenv
@ -52,7 +53,7 @@ DEFAULT_SETTINGS = {
},
"disable_ssl": {
"description": "Disable SSL for PlatformIO services",
"value": True
"value": sys.version_info < (2, 7, 9)
},
"enable_telemetry": {
"description":

View File

@ -20,7 +20,7 @@ from os.path import dirname, join
import click
import semantic_version
from platformio import commands, exception, util
from platformio import app, commands, exception, util
from platformio.managers.package import BasePkgManager
@ -199,8 +199,8 @@ class LibraryManager(BasePkgManager):
pkg_dir = None
try:
pkg_dir = self._install_from_url(
name, dl_data['url'].replace("http://", "https://"),
requirements)
name, dl_data['url'] if app.get_setting("disable_ssl") else
dl_data['url'].replace("http://", "https://"), requirements)
except exception.APIRequestError:
pkg_dir = self._install_from_url(name, dl_data['url'],
requirements)