Synchronize with trytond pyson
This commit is contained in:
1 parent
e3775ea1b9
commit
c12d19b8ff
1 file changed
+2
-3
+2
-3
@@ -24,7 +24,7 @@ class PYSON(object):
|
||||
raise NotImplementedError
|
||||
|
||||
def __invert__(self):
|
||||
if self.types() != set([bool]):
|
||||
if self.types()!= set([bool]):
|
||||
return Not(Bool(self))
|
||||
else:
|
||||
return Not(self)
|
||||
@@ -309,8 +309,7 @@ class If(PYSON):
|
||||
def __init__(self, condition, then_statement, else_statement=None):
|
||||
super(If, self).__init__()
|
||||
if isinstance(condition, PYSON):
|
||||
assert condition.types() == set([bool]), \
|
||||
'condition must be boolean'
|
||||
assert condition.types() == set([bool]), 'condition must be boolean'
|
||||
else:
|
||||
assert isinstance(condition, bool), 'condition must be boolean'
|
||||
if isinstance(then_statement, PYSON):
|
||||
|
||||
Reference in new issue
Block a user