Skills needed export (#1412): Need to encode the string before we gzip it

This commit is contained in:
blitzmann
2018-02-23 00:23:45 -05:00
parent dd78a41171
commit 5b2c5907ed

View File

@@ -115,6 +115,7 @@ class SkillBackupThread(threading.Thread):
def run(self):
path = self.path
sCharacter = Character.getInstance()
if self.saveFmt == "xml" or self.saveFmt == "emp":
backupData = sCharacter.exportXml()
else:
@@ -122,14 +123,13 @@ class SkillBackupThread(threading.Thread):
if self.saveFmt == "emp":
with gzip.open(path, mode='wb') as backupFile:
backupFile.write(backupData)
backupFile.write(backupData.encode())
else:
with open(path, mode='w', encoding='utf-8') as backupFile:
backupFile.write(backupData)
wx.CallAfter(self.callback)
class Character(object):
instance = None
skillReqsDict = {}