parameters: (version_val)
return_statement: return version_val
docstring: Parse distro version value, converting SVN revision to version value if necessary
docstring_summary: Parse distro version value, converting SVN revision to version value if necessary
docstring_tokens: Parse distro version value converting SVN revision to version value if necessary
function: def _distro_version(version_val):
      """
      Parse distro version value, converting SVN revision to version value if necessary
      """
      version_val = str(version_val)
      # check for no keyword sub
      if version_val == '$Revision$':
          return 0
      m = re.search('\$Revision:\s*([0-9]*)\s*\$', version_val)
      if m is not None:
          version_val = 'r'+m.group(1)
  
      # Check that is a valid version string
      valid = string.ascii_letters + string.digits + '.+~'
      if False in (c in valid for c in version_val):
          raise InvalidDistro("Version string %s not valid"%version_val)
      return version_val
function_tokens: def _distro_version ( version_val ) : version_val = str ( version_val ) # check for no keyword sub if version_val == '$Revision$' : return 0 m = re . search ( '\$Revision:\s*([0-9]*)\s*\$' , version_val ) if m is not None : version_val = 'r' + m . group ( 1 ) # Check that is a valid version string valid = string . ascii_letters + string . digits + '.+~' if False in ( c in valid for c in version_val ) : raise InvalidDistro ( "Version string %s not valid" % version_val ) return version_val