mirror of
https://gitlab.com/scemama/EZFIO.git
synced 2024-12-22 04:13:34 +01:00
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
Block a user