From caa2ebfde8a34bbcda61a4d5f24178a7b4ef6776 Mon Sep 17 00:00:00 2001 From: Felix Lohmeier Date: Fri, 16 Aug 2019 13:15:24 +0200 Subject: [PATCH] Workaround for SSL verification problems in one-file-executables --- google/refine/cli.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/google/refine/cli.py b/google/refine/cli.py index a2ef2d2..106a3d2 100644 --- a/google/refine/cli.py +++ b/google/refine/cli.py @@ -21,6 +21,7 @@ Functions used by the command line interface (CLI) import json import os +import ssl import sys import time import urllib @@ -141,7 +142,9 @@ def download(url, output_file=None): 'Delete existing file or try command --output ' 'to specify a different filename.' % output_file) return - urllib.urlretrieve(url, output_file) + # Workaround for SSL verification problems in one-file-executables + context = ssl._create_unverified_context() + urllib.urlretrieve(url, output_file, context=context) print('Download to file %s complete' % output_file)