From 9c01340af4f11d6280c79b5804896fd383efdf26 Mon Sep 17 00:00:00 2001 From: angelblue05 Date: Sat, 22 Dec 2018 02:49:35 -0600 Subject: [PATCH] Verify patch connection --- resources/lib/downloader.py | 18 +++++++++++------- 1 file changed, 11 insertions(+), 7 deletions(-) diff --git a/resources/lib/downloader.py b/resources/lib/downloader.py index 33d73b41..d9b52a49 100644 --- a/resources/lib/downloader.py +++ b/resources/lib/downloader.py @@ -368,17 +368,21 @@ def get_objects(src, filename): LOG.info("From %s to %s", src, path.decode('utf-8')) try: - response = requests.get(src, stream=True, verify=False) + response = requests.get(src, stream=True, verify=True) response.raise_for_status() + except requests.exceptions.SSLError as error: + + LOG.error(error) + response = requests.get(src, stream=True, verify=False) except Exception as error: raise - else: - dl = xbmcvfs.File(path, 'w') - dl.write(response.content) - dl.close() - del response - settings('appliedPatch', filename) + dl = xbmcvfs.File(path, 'w') + dl.write(response.content) + dl.close() + del response + + settings('appliedPatch', filename) unzip(path, temp, "objects")