Clean up another broken reference. Fix broken XML export.
This commit is contained in:
@@ -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:
|
||||
|
||||
@@ -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 """
|
||||
|
||||
@@ -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()
|
||||
|
||||
Reference in New Issue
Block a user