From c12d19b8ffe400445adbedeaed459f57edc18fd4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?C=C3=A9dric=20Krier?= Date: Mon, 5 Mar 2012 10:20:05 +0100 Subject: [PATCH] Synchronize with trytond pyson --- proteus/pyson.py | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/proteus/pyson.py b/proteus/pyson.py index 830c057cfb..70a087ed69 100644 --- a/proteus/pyson.py +++ b/proteus/pyson.py @@ -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):