Fix for #1383. Due to the changed mechanics of None in py3, getModifiedItemAttr was defaulted to 0 instead of None. This adds an explicit default of None when trying to find the allowed drone group attribute

This commit is contained in:
blitzmann
2018-02-17 10:53:29 -05:00
parent 0456cb2f96
commit e779bb84e2

View File

@@ -264,7 +264,7 @@ class Drone(HandledItem, HandledCharge, ItemAttrShortcut, ChargeAttrShortcut):
def fits(self, fit):
fitDroneGroupLimits = set()
for i in range(1, 3):
groneGrp = fit.ship.getModifiedItemAttr("allowedDroneGroup%d" % i)
groneGrp = fit.ship.getModifiedItemAttr("allowedDroneGroup%d" % i, None)
if groneGrp is not None:
fitDroneGroupLimits.add(int(groneGrp))
if len(fitDroneGroupLimits) == 0: