Simplified boolean check

This commit is contained in:
Ebag333
2016-10-19 08:08:50 -07:00
parent c7554ec400
commit c1dfd676e1
10 changed files with 15 additions and 15 deletions

View File

@@ -561,7 +561,7 @@ class Module(HandledItem, HandledCharge, ItemAttrShortcut, ChargeAttrShortcut):
"itemID" : lambda val: val is None or isinstance(val, int),
"ammoID" : lambda val: isinstance(val, int)}
if map[key](val) == False: raise ValueError(str(val) + " is not a valid value for " + key)
if not map[key](val): raise ValueError(str(val) + " is not a valid value for " + key)
else: return val
def clear(self):