summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDarik Gamble <darik.gamble@gmail.com>2016-10-02 13:48:42 -0400
committerDarik Gamble <darik.gamble@gmail.com>2016-10-02 13:48:42 -0400
commitfeea19442b98f8cafab6aa3755a991778a0e2f3d (patch)
tree93e9ed5a04dbd1ebf2cc5ec1c09c08b40bbc0a31
parentab6efc7457bc2d764610b0bbcc8cc464925b18f0 (diff)
Convert type to int before attempting formatting
-rw-r--r--pgcli/packages/tabulate.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/pgcli/packages/tabulate.py b/pgcli/packages/tabulate.py
index 332a7f28..e92d2ec0 100644
--- a/pgcli/packages/tabulate.py
+++ b/pgcli/packages/tabulate.py
@@ -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: