parameters: (self, patch_path)
return_statement: return True
docstring: Parse a patch file.
  
      Parse the patch file at path patch_path and store the patch info into
      _patch_set. Parsing-error messages are sent to stderr.
  
      Argument:
        patch_path: path to the patch file.
  
      Return:
        True if the patch file is successfully read and ready to apply and False
        otherwise.
docstring_summary: Parse a patch file.
docstring_tokens: Parse a patch file .
function: def Parse(self, patch_path):
      ''' Parse a patch file.
  
      Parse the patch file at path patch_path and store the patch info into
      _patch_set. Parsing-error messages are sent to stderr.
  
      Argument:
        patch_path: path to the patch file.
  
      Return:
        True if the patch file is successfully read and ready to apply and False
        otherwise.
      '''
      try:
        if not os.path.exists(patch_path):
          raise Error(context=patch_path, error="Patch file not found");
        with open(patch_path) as patch_file:
          self._patch_set = _PatchSet()
          self._patch_set.Parse(patch_file)
  
      except Error as (error):
        sys.stderr.write('Patch error: %s.\n' % error.error)
        sys.stderr.write('At line: %s\n' % error.context)
        return False
  
      return True
function_tokens: def Parse ( self , patch_path ) : try : if not os . path . exists ( patch_path ) : raise Error ( context = patch_path , error = "Patch file not found" ) with open ( patch_path ) as patch_file : self . _patch_set = _PatchSet ( ) self . _patch_set . Parse ( patch_file ) except Error as ( error ) : sys . stderr . write ( 'Patch error: %s.\n' % error . error ) sys . stderr . write ( 'At line: %s\n' % error . context ) return False return True