mirror of https://gitlab.com/scemama/EZFIO.git
fix string handling so it works with bytes or str object
This commit is contained in:
parent
e2a79a0c53
commit
13a32e3de3
|
@ -102,7 +102,7 @@ def get_conv(type):
|
|||
else:
|
||||
raise TypeError
|
||||
elif type == "ch":
|
||||
conv = lambda x: x.decode('utf-8').strip()
|
||||
conv = lambda x: x.decode('utf-8').strip() if isinstance(x,bytes) else x.strip()
|
||||
else:
|
||||
raise TypeError
|
||||
return conv
|
||||
|
|
Loading…
Reference in New Issue