[attributs] Pitit problème de parenthesage logique

This commit is contained in:
Valentin Samir 2014-02-17 22:07:19 +01:00
parent 012895ca0b
commit 525d7941ff

View file

@ -126,7 +126,7 @@ def attrify(val, attr, conn, Parent=None):
return val
else:
attr_classe = AttributeFactory.get(attr, fallback=Attr)
if not isinstance(val, unicode) and (attr_classe.python_type and not isinstance(val, attr_classe.python_type)):
if not isinstance(val, unicode) and not (attr_classe.python_type and isinstance(val, attr_classe.python_type)):
cranslib.deprecated.usage("attrify ne devrait être appelé qu'avec des unicode (%r)" % val, level=3)
val = val.decode('utf-8')
return attr_classe(val, conn, Parent)