'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.'

def _check_submodule_no_git(self):

    gitmodules_path = os.path.abspath('.gitmodules')
    if (not os.path.isfile(gitmodules_path)):
        return False
    gitmodules_fileobj = io.StringIO()
    with io.open(gitmodules_path) as f:
        for line in f:
            line = line.lstrip()
            if (line and (line[0] in (':', ';'))):
                continue
            gitmodules_fileobj.write(line)
    gitmodules_fileobj.seek(0)
    cfg = RawConfigParser()
    try:
        cfg.readfp(gitmodules_fileobj)
    except Exception as exc:
        log.warn('Malformatted    .gitmodules    file:    {0}\n{1}    cannot    be    assumed    to    be    a    git    submodule.'.format(exc, self.path))
        return False
    for section in cfg.sections():
        if (not cfg.has_option(section, 'path')):
            continue
        submodule_path = cfg.get(section, 'path').rstrip(os.sep)
        if (submodule_path == self.path.rstrip(os.sep)):
            return True
    return False
