parameters: (line)
return_statement: return distro_info
docstring: Parse a line from a distro release file.
  
  
  
          Parameters:
  
          * line: Line from the distro release file. Must be a unicode string
  
                  or a UTF-8 encoded byte string.
  
  
  
          Returns:
  
              A dictionary containing all information items.
function: def _parse_distro_release_content(line):
  
          """
  
          Parse a line from a distro release file.
  
  
  
          Parameters:
  
          * line: Line from the distro release file. Must be a unicode string
  
                  or a UTF-8 encoded byte string.
  
  
  
          Returns:
  
              A dictionary containing all information items.
  
          """
  
          matches = _DISTRO_RELEASE_CONTENT_REVERSED_PATTERN.match(
  
              line.strip()[::-1])
  
          distro_info = {}
  
          if matches:
  
              # regexp ensures non-None
  
              distro_info['name'] = matches.group(3)[::-1]
  
              if matches.group(2):
  
                  distro_info['version_id'] = matches.group(2)[::-1]
  
              if matches.group(1):
  
                  distro_info['codename'] = matches.group(1)[::-1]
  
          elif line:
  
              distro_info['name'] = line.strip()
  
          return distro_info
function_tokens: def _parse_distro_release_content ( line ) : matches = _DISTRO_RELEASE_CONTENT_REVERSED_PATTERN . match ( line . strip ( ) [ : : - 1 ] ) distro_info = { } if matches : # regexp ensures non-None distro_info [ 'name' ] = matches . group ( 3 ) [ : : - 1 ] if matches . group ( 2 ) : distro_info [ 'version_id' ] = matches . group ( 2 ) [ : : - 1 ] if matches . group ( 1 ) : distro_info [ 'codename' ] = matches . group ( 1 ) [ : : - 1 ] elif line : distro_info [ 'name' ] = line . strip ( ) return distro_info