From 8b373ba8bccddeda9fc47b7875db3252bde02133 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?R=C3=A9mi=20Cardona?= Date: Fri, 18 Sep 2015 15:01:34 +0200 Subject: [py3k] six.integer_types --- logilab/common/optik_ext.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/logilab/common/optik_ext.py b/logilab/common/optik_ext.py index 1fd2a7f..f8805b0 100644 --- a/logilab/common/optik_ext.py +++ b/logilab/common/optik_ext.py @@ -56,6 +56,8 @@ import time from copy import copy from os.path import exists +from six import integer_types + # python >= 2.3 from optparse import OptionParser as BaseParser, Option as BaseOption, \ OptionGroup, OptionContainer, OptionValueError, OptionError, \ @@ -169,7 +171,7 @@ def check_color(option, opt, value): raise OptionValueError(msg % (opt, value)) def check_time(option, opt, value): - if isinstance(value, (int, long, float)): + if isinstance(value, integer_types + (float,)): return value return apply_units(value, TIME_UNITS) -- cgit v1.2.1