Don't base64-encode integers
This is a temporary fix until we either use Params to determine output type or treat integers differently from other binary values internally (as unicode instead of str, for example).
This commit is contained in:
1 parent
f52c671ca1
commit
7ccac40175
1 file changed
+5
-1
+5
-1
@@ -145,7 +145,11 @@ class textui(backend.Backend):
|
||||
if it is a python str type, otherwise it is a plain string.
|
||||
"""
|
||||
if type(value) is str:
|
||||
return base64.b64encode(value)
|
||||
try:
|
||||
int(value)
|
||||
return value
|
||||
except ValueError:
|
||||
return base64.b64encode(value)
|
||||
else:
|
||||
return value
|
||||
|
||||
|
||||
Reference in new issue
Block a user