Check the ness to see if it's an implant, booster, or something else.
Log it if it's something else and don't try and import it. This prevents a bad line from failing the entire import, and (hopefully) we know about it.
This commit is contained in:
@@ -406,11 +406,12 @@ class Port(object):
|
||||
cargoMap[modName] = 0
|
||||
cargoMap[modName] += extraAmount
|
||||
elif item.category.name == "Implant":
|
||||
try:
|
||||
if "implantness" in item.attributes:
|
||||
fit.implants.append(Implant(item))
|
||||
except ValueError:
|
||||
# Passed item isn't an implant. Try loading it as a booster.
|
||||
elif "boosterness" in item.attributes:
|
||||
fit.boosters.append(Booster(item))
|
||||
else:
|
||||
logger.error("Failed to import implant: %s", line)
|
||||
# elif item.category.name == "Subsystem":
|
||||
# try:
|
||||
# subsystem = Module(item)
|
||||
|
||||
Reference in New Issue
Block a user