summaryrefslogtreecommitdiff
path: root/server
diff options
context:
space:
mode:
authormbligh <mbligh@592f7852-d20e-0410-864c-8624ca9c26a4>2009-05-13 21:35:27 +0000
committermbligh <mbligh@592f7852-d20e-0410-864c-8624ca9c26a4>2009-05-13 21:35:27 +0000
commit6ffbd425b0961cf38dad6b2cfc436f36b6cea501 (patch)
treebca92366b248dca965000d31bb6a41e6c8841ed7 /server
parentda697cb02f5c03496ca718869bcbe4a2472bcc76 (diff)
Replaced os.environ['HOME'] usage with os.path.expanduser() to not fail
when HOME is not defined. Signed-off-by: Mihai Rusu <dizzy@google.com> git-svn-id: svn://test.kernel.org/autotest/trunk@3140 592f7852-d20e-0410-864c-8624ca9c26a4
Diffstat (limited to 'server')
-rw-r--r--server/base_utils.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/server/base_utils.py b/server/base_utils.py
index 274a74e7..e38fc457 100644
--- a/server/base_utils.py
+++ b/server/base_utils.py
@@ -315,7 +315,7 @@ def get_public_key():
ssh-keygen and return it.
"""
- ssh_conf_path = os.path.join(os.environ['HOME'], '.ssh')
+ ssh_conf_path = os.path.expanduser('~/.ssh')
dsa_public_key_path = os.path.join(ssh_conf_path, 'id_dsa.pub')
dsa_private_key_path = os.path.join(ssh_conf_path, 'id_dsa')