[IMP] replace equality None test by identity test

bzr revid: xmo@openerp.com-20120723135215-7n63uh4ikulsdc6r
This commit is contained in:
Xavier Morel
2012-07-23 15:52:15 +02:00
parent 3b5890d79b
commit 8b0f8a0992
+2 -2
View File
@@ -49,7 +49,7 @@ import simplejson
_logger = logging.getLogger(__name__)
def _symbol_set(symb):
if symb == None or symb == False:
if symb is None or symb == False:
return None
elif isinstance(symb, unicode):
return symb.encode('utf-8')
@@ -191,7 +191,7 @@ class char(_column):
# * we need to remove the "symb==False" from the next line BUT
# for now too many things rely on this broken behavior
# * the symb==None test should be common to all data types
if symb == None or symb == False:
if symb is None or symb == False:
return None
# we need to convert the string to a unicode object to be able