summaryrefslogtreecommitdiff
path: root/logilab
diff options
context:
space:
mode:
authorRémi Cardona <remi.cardona@logilab.fr>2015-09-18 15:01:34 +0200
committerRémi Cardona <remi.cardona@logilab.fr>2015-09-18 15:01:34 +0200
commit8b373ba8bccddeda9fc47b7875db3252bde02133 (patch)
tree3e94ca41f8f52b7ff1dd9c795a21a2a4c107106a /logilab
parent93275d9f0a049c1a80a0f6dfcc5adbc330dba928 (diff)
downloadlogilab-common-8b373ba8bccddeda9fc47b7875db3252bde02133.tar.gz
[py3k] six.integer_types
Diffstat (limited to 'logilab')
-rw-r--r--logilab/common/optik_ext.py4
1 files changed, 3 insertions, 1 deletions
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)