diff options
author | Amjith Ramanujam <amjith.r@gmail.com> | 2015-02-13 00:53:16 -0800 |
---|---|---|
committer | Amjith Ramanujam <amjith.r@gmail.com> | 2015-02-13 00:53:16 -0800 |
commit | 868a7a88f7a735222b29b85d1f501a8883c03f63 (patch) | |
tree | cec0d1a03b4401049f8c52b739aa6739f8f6c3b9 | |
parent | 82f134986e16147c349edf496c3e241221c979fd (diff) |
Fix failing tests in python 3.
-rw-r--r-- | pgcli/packages/tabulate.py | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/pgcli/packages/tabulate.py b/pgcli/packages/tabulate.py index d53b175b..80c8d7e5 100644 --- a/pgcli/packages/tabulate.py +++ b/pgcli/packages/tabulate.py @@ -14,6 +14,7 @@ if python_version_tuple()[0] < "3": from functools import partial _none_type = type(None) _int_type = int + _long_type = long _float_type = float _text_type = unicode _binary_type = str @@ -26,6 +27,7 @@ else: from functools import reduce, partial _none_type = type(None) _int_type = int + _long_type = int _float_type = float _text_type = str _binary_type = bytes @@ -302,7 +304,7 @@ def _isint(string): >>> _isint("123.45") False """ - return type(string) is int or type(string) is long or \ + return type(string) is _int_type or type(string) is _long_type or \ (isinstance(string, _binary_type) or isinstance(string, _text_type)) and \ _isconvertible(int, string) |