From 4e8daaa21f31b3531f9de3ffe3238ad6d005bde9 Mon Sep 17 00:00:00 2001 From: Headshotnoby Date: Mon, 21 Jun 2021 23:20:32 -0400 Subject: [PATCH] ssl error on winxp??? --- updater.py | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/updater.py b/updater.py index b9ecd86..8c7dddb 100644 --- a/updater.py +++ b/updater.py @@ -1,5 +1,8 @@ -import json, urllib, sys, requests, time, os, platform +import json, sys, requests, time, os, platform, traceback +from io import BytesIO + from PyQt4 import QtGui, QtCore + from game_version import * returncode = -1 @@ -112,8 +115,9 @@ class updateThread(QtCore.QThread): global returncode try: - manifest = json.load(urllib.urlopen("http://api.github.com/repos/headshot2017/AO2XP/releases")) + manifest = json.load(BytesIO(requests.get("http://api.github.com/repos/headshot2017/AO2XP/releases").content)) except: + print traceback.format_exc() self.showMessageBox.emit("critical", "Error", "Failed to check for updates.\nPlease check your internet connection.") self.finished.emit() return