diff options
author | spisarski <s.pisarski@cablelabs.com> | 2018-05-09 10:48:09 -0600 |
---|---|---|
committer | spisarski <s.pisarski@cablelabs.com> | 2018-05-09 11:59:32 -0600 |
commit | 44e8131216787127980558824b2a1def94fe317e (patch) | |
tree | 74f59c4c58e36ce7e438f55fe8edbe33eb8d41d5 /snaps/file_utils.py | |
parent | 9651c889f1b966dc2733daf7eabbb5e62268654d (diff) |
Patch to make flavor configuration for tests more flexible.
Also fixed potential issues with downloading images from https locations
JIRA: SNAPS-254
Change-Id: Ib81569df499bbf0652c2025fc7de37af92525f7f
Signed-off-by: spisarski <s.pisarski@cablelabs.com>
Diffstat (limited to 'snaps/file_utils.py')
-rw-r--r-- | snaps/file_utils.py | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/snaps/file_utils.py b/snaps/file_utils.py index a421dd3..58ec55c 100644 --- a/snaps/file_utils.py +++ b/snaps/file_utils.py @@ -12,6 +12,8 @@ # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # See the License for the specific language governing permissions and # limitations under the License. +import ssl + import os import logging @@ -168,7 +170,8 @@ def __get_url_response(url): proxy_handler = urllib.ProxyHandler({}) opener = urllib.build_opener(proxy_handler) urllib.install_opener(opener) - return urllib.urlopen(url) + context = ssl._create_unverified_context() + return urllib.urlopen(url, context=context) def read_yaml(config_file_path): |