def store_version(option, opt_str, value, parser): version = siputils.version_from_string(value) if version is None: raise optparse.OptionValueError( "'%s' is not a valid version number" % value) setattr(parser.values, option.dest, version)
def store_version(option, opt_str, value, parser): version = siputils.version_from_string(value) if version is None: raise optparse.OptionValueError("'%s' is not a valid version number" % value) setattr(parser.values, option.dest, version)