ssl error on winxp???

This commit is contained in:
Headshotnoby 2021-06-21 23:20:32 -04:00
parent 6bff2b2b21
commit 4e8daaa21f

View File

@ -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