Revision d12b9f66 lib/ssh.py
b/lib/ssh.py | ||
---|---|---|
49 | 49 |
|
50 | 50 |
|
51 | 51 |
def GetUserFiles(user, mkdir=False, kind=constants.SSHK_DSA, |
52 |
_homedir_fn=utils.GetHomeDir):
|
|
52 |
_homedir_fn=None):
|
|
53 | 53 |
"""Return the paths of a user's SSH files. |
54 | 54 |
|
55 | 55 |
@type user: string |
... | ... | |
67 | 67 |
exception is raised if C{~$user/.ssh} is not a directory |
68 | 68 |
|
69 | 69 |
""" |
70 |
if _homedir_fn is None: |
|
71 |
_homedir_fn = utils.GetHomeDir |
|
72 |
|
|
70 | 73 |
user_dir = _homedir_fn(user) |
71 | 74 |
if not user_dir: |
72 | 75 |
raise errors.OpExecError("Cannot resolve home of user '%s'" % user) |
Also available in: Unified diff