Exemple #1
0
 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)
Exemple #2
0
 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)