diff options
Diffstat (limited to 'optik_ext.py')
-rw-r--r-- | optik_ext.py | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/optik_ext.py b/optik_ext.py index 5ce2dfd..43bdf17 100644 --- a/optik_ext.py +++ b/optik_ext.py @@ -190,7 +190,10 @@ class Option(BaseOption): def process(self, opt, value, values, parser): # First, convert the value(s) to the right type. Howl if any # value(s) are bogus. - value = self.convert_value(opt, value) + try: + value = self.convert_value(opt, value) + except AttributeError: # py < 2.4 + value = self.check_value(opt, value) if self.type == 'named': existant = getattr(values, self.dest) if existant: |