diff options
author | Rémi Cardona <remi.cardona@logilab.fr> | 2015-09-18 15:01:34 +0200 |
---|---|---|
committer | Rémi Cardona <remi.cardona@logilab.fr> | 2015-09-18 15:01:34 +0200 |
commit | 8b373ba8bccddeda9fc47b7875db3252bde02133 (patch) | |
tree | 3e94ca41f8f52b7ff1dd9c795a21a2a4c107106a /logilab | |
parent | 93275d9f0a049c1a80a0f6dfcc5adbc330dba928 (diff) | |
download | logilab-common-8b373ba8bccddeda9fc47b7875db3252bde02133.tar.gz |
[py3k] six.integer_types
Diffstat (limited to 'logilab')
-rw-r--r-- | logilab/common/optik_ext.py | 4 |
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) |