def getClientBySockName(sockname): base = GitFSBase() base.socket_path = sockname info = base.getInfoRemote() if 'path' in info: return GitFSClient(info['path'], sockname) raise GitFSError(GitFSError.eNotGitFS, "Not a gitfs socket.")
def checkSocketName(sockname): base = GitFSBase() base.socket_path = sockname info = base.getInfoRemote() logging.debug('attempting getinfo for %s returned %s' %(sockname, info)) if 'path' in info: return sockname raise GitFSError(GitFSError.eNotGitFS, "Not a gitfs socket.")