From feea19442b98f8cafab6aa3755a991778a0e2f3d Mon Sep 17 00:00:00 2001 From: Darik Gamble Date: Sun, 2 Oct 2016 13:48:42 -0400 Subject: Convert type to int before attempting formatting --- pgcli/packages/tabulate.py | 4 ++-- 1 file 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: -- cgit v1.2.3