diff options
-rw-r--r-- | git_command.py | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/git_command.py b/git_command.py index 954bebad..7ff1abac 100644 --- a/git_command.py +++ b/git_command.py | |||
@@ -35,8 +35,11 @@ def _ssh_sock(create=True): | |||
35 | if _ssh_sock_path is None: | 35 | if _ssh_sock_path is None: |
36 | if not create: | 36 | if not create: |
37 | return None | 37 | return None |
38 | dir = '/tmp' | ||
39 | if not os.path.exists(dir): | ||
40 | dir = tempfile.gettempdir() | ||
38 | _ssh_sock_path = os.path.join( | 41 | _ssh_sock_path = os.path.join( |
39 | tempfile.mkdtemp('', 'ssh-'), | 42 | tempfile.mkdtemp('', 'ssh-', dir), |
40 | 'master-%r@%h:%p') | 43 | 'master-%r@%h:%p') |
41 | return _ssh_sock_path | 44 | return _ssh_sock_path |
42 | 45 | ||