Set all strings to be unicode when referencing fit.name. This won't catch all conversion errors, but it should catch most. (#1168)

This commit is contained in:
Ryan Holmes
2017-05-14 20:52:06 -04:00
committed by GitHub
parent a0f5e4cbb3
commit da33a372cb
8 changed files with 10 additions and 10 deletions

View File

@@ -141,7 +141,7 @@ class Fit(object):
except ValueError:
ship = es_Citadel(eos.db.getItem(shipID))
fit = FitType(ship)
fit.name = name if name is not None else "New %s" % fit.ship.item.name
fit.name = name if name is not None else u"New %s" % fit.ship.item.name
fit.damagePattern = self.pattern
fit.targetResists = self.targetResists
fit.character = self.character
@@ -1174,7 +1174,7 @@ class Fit(object):
def recalc(self, fit):
start_time = time()
pyfalog.info("=" * 10 + "recalc" + "=" * 10)
pyfalog.info(u"=" * 10 + u"recalc: {0}" + u"=" * 10, fit.name)
if fit.factorReload is not self.serviceFittingOptions["useGlobalForceReload"]:
fit.factorReload = self.serviceFittingOptions["useGlobalForceReload"]
fit.clear()

View File

@@ -1114,7 +1114,7 @@ class Port(object):
also, it's OK to arrange modules randomly?
"""
offineSuffix = " /OFFLINE"
export = "[%s, %s]\n" % (fit.ship.item.name, fit.name)
export = u"[%s, %s]\n" % (fit.ship.item.name, fit.name)
stuff = {}
sFit = svcFit.getInstance()
for module in fit.modules: