mirror of
https://github.com/dbcli/pgcli.git
synced 2024-10-06 10:17:15 +03:00
Convert type to int before attempting formatting
This commit is contained in:
parent
ab6efc7457
commit
feea19442b
@ -496,7 +496,7 @@ def _column_type(strings, has_invisible=True):
|
||||
return reduce(_more_generic, types, int)
|
||||
|
||||
|
||||
def _format(val, valtype, dcmlfmt ,floatfmt, missingval=""):
|
||||
def _format(val, valtype, dcmlfmt, floatfmt, missingval=""):
|
||||
"""Format a value accoding to its type.
|
||||
|
||||
Unicode is supported:
|
||||
@ -512,7 +512,7 @@ def _format(val, valtype, dcmlfmt ,floatfmt, missingval=""):
|
||||
return missingval
|
||||
|
||||
if valtype is int:
|
||||
return format(val, dcmlfmt)
|
||||
return format(int(val), dcmlfmt)
|
||||
elif valtype is _text_type:
|
||||
return "{0}".format(val)
|
||||
elif valtype is _binary_type:
|
||||
|
Loading…
Reference in New Issue
Block a user