parent
bdf3e919c9
commit
99661844dd
|
@ -41,7 +41,9 @@ class HostInfo(object):
|
|||
import os
|
||||
targetdir = %r
|
||||
if not os.path.isabs(targetdir):
|
||||
homedir = os.environ['HOME']
|
||||
homedir = os.environ.get('HOME', '')
|
||||
if not homedir:
|
||||
homedir = os.environ.get('HOMEPATH', '.')
|
||||
targetdir = os.path.join(homedir, targetdir)
|
||||
if not os.path.exists(targetdir):
|
||||
os.makedirs(targetdir)
|
||||
|
|
|
@ -43,7 +43,7 @@ class TestHostInfo:
|
|||
x.initgateway()
|
||||
assert x.gw
|
||||
try:
|
||||
homedir = py.path.local(py.std.os.environ['HOME'])
|
||||
homedir = py.path.local._gethomedir()
|
||||
expected = homedir.join(name)
|
||||
assert x.gw_remotepath == str(expected)
|
||||
assert x.localdest == expected
|
||||
|
|
Loading…
Reference in New Issue