Clean up another broken reference. Fix broken XML export.

This commit is contained in:
Ebag333
2017-01-24 21:34:24 -08:00
parent cc3274f245
commit 8095b4852b
3 changed files with 5 additions and 8 deletions

View File

@@ -397,7 +397,8 @@ class MainFrame(wx.Frame):
format_ = dlg.GetFilterIndex()
path = dlg.GetPath()
if format_ == 0:
output = sFit.exportXml(None, self.getActiveFit())
sPort = Port.getInstance()
output = sPort.exportXml(None, self.getActiveFit())
if '.' not in os.path.basename(path):
path += ".xml"
else:

View File

@@ -78,11 +78,7 @@ class Fit(object):
def getAllFits(self):
fits = eos.db.getFitList()
names = []
for fit in fits:
names.append((fit.ID, fit.name))
return names
return fits
def getFitsWithShip(self, shipID):
""" Lists fits of shipID, used with shipBrowser """

View File

@@ -1133,8 +1133,8 @@ class FitBackupThread(threading.Thread):
def run(self):
path = self.path
sFit = svcFit.getInstance()
allFits = map(lambda x: x[0], sFit.getAllFits())
backedUpFits = sFit.exportXml(self.callback, *allFits)
sPort = Port.getInstance()
backedUpFits = sPort.exportXml(self.callback, *sFit.getAllFits())
backupFile = open(path, "w", encoding="utf-8")
backupFile.write(backedUpFits)
backupFile.close()