summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorNico Sallembien <nsallembien@google.com>2010-04-27 14:35:27 -0700
committerNico Sallembien <nsallembien@google.com>2010-04-27 14:35:27 -0700
commit1c85f4e43ba2d337b1e8c49bb3c7814a5cb163ae (patch)
treee2f22213eec12b827bf4cfeaf6cf72b6d45f6d8e
parent719965af35a2fab96cb578c8a19a48a2cf9fe8e8 (diff)
downloadgit-repo-1c85f4e43ba2d337b1e8c49bb3c7814a5cb163ae.tar.gz
Rename _ssh_sock() to fix code style issue.
Since _ssh_sock is imported out of the git_command module, the leading underscore should be removed from the function name.
-rw-r--r--git_command.py4
-rw-r--r--git_config.py6
2 files changed, 5 insertions, 5 deletions
diff --git a/git_command.py b/git_command.py
index d56ad0a8..3309f378 100644
--- a/git_command.py
+++ b/git_command.py
@@ -30,7 +30,7 @@ LAST_CWD = None
30_ssh_proxy_path = None 30_ssh_proxy_path = None
31_ssh_sock_path = None 31_ssh_sock_path = None
32 32
33def _ssh_sock(create=True): 33def ssh_sock(create=True):
34 global _ssh_sock_path 34 global _ssh_sock_path
35 if _ssh_sock_path is None: 35 if _ssh_sock_path is None:
36 if not create: 36 if not create:
@@ -119,7 +119,7 @@ class GitCommand(object):
119 if disable_editor: 119 if disable_editor:
120 env['GIT_EDITOR'] = ':' 120 env['GIT_EDITOR'] = ':'
121 if ssh_proxy: 121 if ssh_proxy:
122 env['REPO_SSH_SOCK'] = _ssh_sock() 122 env['REPO_SSH_SOCK'] = ssh_sock()
123 env['GIT_SSH'] = _ssh_proxy() 123 env['GIT_SSH'] = _ssh_proxy()
124 124
125 if project: 125 if project:
diff --git a/git_config.py b/git_config.py
index 45a2d257..a7c82107 100644
--- a/git_config.py
+++ b/git_config.py
@@ -23,7 +23,7 @@ from signal import SIGTERM
23from urllib2 import urlopen, HTTPError 23from urllib2 import urlopen, HTTPError
24from error import GitError, UploadError 24from error import GitError, UploadError
25from trace import Trace 25from trace import Trace
26from git_command import GitCommand, _ssh_sock 26from git_command import GitCommand, ssh_sock
27 27
28R_HEADS = 'refs/heads/' 28R_HEADS = 'refs/heads/'
29R_TAGS = 'refs/tags/' 29R_TAGS = 'refs/tags/'
@@ -371,7 +371,7 @@ def _open_ssh(host, port):
371 return False 371 return False
372 372
373 command = ['ssh', 373 command = ['ssh',
374 '-o','ControlPath %s' % _ssh_sock(), 374 '-o','ControlPath %s' % ssh_sock(),
375 '-p',str(port), 375 '-p',str(port),
376 '-M', 376 '-M',
377 '-N', 377 '-N',
@@ -399,7 +399,7 @@ def close_ssh():
399 pass 399 pass
400 _ssh_cache.clear() 400 _ssh_cache.clear()
401 401
402 d = _ssh_sock(create=False) 402 d = ssh_sock(create=False)
403 if d: 403 if d:
404 try: 404 try:
405 os.rmdir(os.path.dirname(d)) 405 os.rmdir(os.path.dirname(d))