Commit 8d2d4c7f authored by Jérome Perrin's avatar Jérome Perrin

fixup! fix SyntaxWarning

parent 9b77144e
......@@ -1014,10 +1014,10 @@ class Base(
result = None
else:
if isinstance(value, (list, tuple)):
if len(value) is 0:
result = None
else:
if len(value):
result = value[0]
else:
result = None
else:
result = value
else:
......@@ -1048,10 +1048,10 @@ class Base(
result = None
else:
if isinstance(value, (list, tuple)):
if len(value) is 0:
result = None
else:
if len(value):
result = value[0]
else:
result = None
else:
result = value
else:
......@@ -1092,10 +1092,10 @@ class Base(
result = None
else:
if isinstance(value, (list, tuple)):
if len(value) is 0:
result = None
else:
if len(value):
result = value[0]
else:
result = None
else:
result = value
else:
......
......@@ -900,7 +900,7 @@ def save_bytes(self, tag, data):
v = b''.join(data[2:])
encoding = a.get('encoding', 'repr')
assert encoding == 'base64'
if encoding is not '':
if encoding != '':
v = unconvert(encoding, v)
if self.binary:
l = len(v)
......@@ -924,7 +924,7 @@ def save_unicode(self, tag, data):
for x in data[2:]:
v=v+x
encoding=a.get('encoding','repr') # JPS: repr is default encoding
if encoding is not '':
if encoding != '':
v=unconvert(encoding,v)
if binary:
l=len(v)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment