def _is_git_repo(self, path):
        if not os.path.isdir(path):
            return False
        orig_dir = os.getcwd()
        try:
            os.chdir(path)
        except __HOLE__:
            return False
        with open('/dev/null', 'wb') as devnull:
            ret = subprocess.call(['git', 'rev-parse'], stderr=devnull)
        os.chdir(orig_dir)
        if ret != 0:
            return False
        else:
            return True
dataset/ETHPy150Open aelse/cpthook/cpthook.py/CptHook._is_git_repo