Fix `TypeError` in Python-3.2
This code may raise TypeError: string argument without an encoding
This commit is contained in:
parent
df5f5e9a7d
commit
76f5a60a9b
|
@ -57,7 +57,7 @@ class Args(object):
|
|||
return None
|
||||
else:
|
||||
if isinstance(ret, (unicode, str, bytes)):
|
||||
return ret.split(type(ret)(':'))
|
||||
return ret.split((b':' if isinstance(ret, bytes) else ':'))
|
||||
else:
|
||||
return ret
|
||||
|
||||
|
|
Loading…
Reference in New Issue