def _check_submodule_no_git(self):
gitmodules_path = os.path.abspath('<STR_LIT>')<EOL>if not os.path.isfile(gitmodules_path):<EOL><INDENT>return False<EOL><DEDENT>gitmodules_fileobj = io.StringIO()<EOL>with io.open(gitmodules_path) as f:<EOL><INDENT>for line in f:<EOL><INDENT>line = line.lstrip()<EOL>if line and line[<NUM_LIT:0>] in ('<STR_LIT::>', '<STR_LIT:;>'):<EOL><INDENT>continue<EOL><DEDENT>gitmodules_fileobj.write(line)<EOL><DEDENT><DEDENT>gitmodules_fileobj.seek(<NUM_LIT:0>)<EOL>cfg = RawConfigParser()<EOL>try:<EOL><INDENT>cfg.readfp(gitmodules_fileobj)<EOL><DEDENT>except Exception as exc:<EOL><INDENT>log.warn('<STR_LIT>'<EOL>'<STR_LIT>'.format(<EOL>exc, self.path))<EOL>return False<EOL><DEDENT>for section in cfg.sections():<EOL><INDENT>if not cfg.has_option(section, '<STR_LIT:path>'):<EOL><INDENT>continue<EOL><DEDENT>submodule_path = cfg.get(section, '<STR_LIT:path>').rstrip(os.sep)<EOL>if submodule_path == self.path.rstrip(os.sep):<EOL><INDENT>return True<EOL><DEDENT><DEDENT>return False<EOL>
Like ``_check_submodule_using_git``, but simply parses the .gitmodules file
to determine if the supplied path is a git submodule, and does not exec any
subprocesses.

This can only determine if a path is a submodule--it does not perform
updates, etc.  This function may need to be updated if the format of the
.gitmodules file is changed between git versions.