Revision 4a25486d kamaki/cli/argument/__init__.py

b/kamaki/cli/argument/__init__.py
213 213

  
214 214
    @value.setter
215 215
    def value(self, newvalue):
216
        if newvalue == self.default:
217
            self._value = newvalue
218
            return
216 219
        try:
217
            self._value = self.default if (
218
                newvalue == self.default) else int(newvalue)
220
            if int(newvalue) == float(newvalue):
221
                self._value = int(newvalue)
222
            else:
223
                raise ValueError('Raise int argument error')
219 224
        except ValueError:
220 225
            raiseCLIError(CLISyntaxError(
221 226
                'IntArgument Error',

Also available in: Unified diff