Fix assertion for multiple same flag parameters

This commit is contained in:
Lonami Exo 2017-12-25 17:59:39 +01:00
parent c218df87d7
commit b11c2e885b

View File

@ -311,8 +311,10 @@ class TLGenerator:
for ra in repeated_args.values(): for ra in repeated_args.values():
if len(ra) > 1: if len(ra) > 1:
cnd1 = ('self.{}'.format(a.name) for a in ra) cnd1 = ('(self.{0} or self.{0} is not None)'
cnd2 = ('not self.{}'.format(a.name) for a in ra) .format(a.name) for a in ra)
cnd2 = ('(self.{0} is None or self.{0} is False)'
.format(a.name) for a in ra)
builder.writeln( builder.writeln(
"assert ({}) or ({}), '{} parameters must all " "assert ({}) or ({}), '{} parameters must all "
"be False-y (like None) or all me True-y'".format( "be False-y (like None) or all me True-y'".format(