summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDavid Pursehouse <david.pursehouse@sonymobile.com>2013-09-11 18:52:22 +0900
committerDavid Pursehouse <david.pursehouse@sonymobile.com>2013-09-11 18:55:23 +0900
commit76716f6a4e6e53b32476a8c81bdeb18e5b7b993c (patch)
tree850297509f795c36d925b343bbb6a69117c8e928
parente161a51bbe40ba8550e9bf4a9049fb63cd82e399 (diff)
downloadpygerrit-76716f6a4e6e53b32476a8c81bdeb18e5b7b993c.tar.gz
Fix #11: correct handling of `identityfile` in the ssh config
The `identityfile` element of the result returned by SSHConfig.lookup() is a list, not a string, therefore calling `expanduser` on it results in a crash. Change-Id: I8673295d66cac9ca3b522867735b1211f0556d21
-rw-r--r--pygerrit/ssh.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/pygerrit/ssh.py b/pygerrit/ssh.py
index 97e712d..c235999 100644
--- a/pygerrit/ssh.py
+++ b/pygerrit/ssh.py
@@ -90,7 +90,7 @@ class GerritSSHClient(SSHClient):
raise GerritError("Missing configuration data in %s" % configfile)
key_filename = None
if 'identityfile' in data:
- key_filename = abspath(expanduser(data['identityfile']))
+ key_filename = abspath(expanduser(data['identityfile'][0]))
if not isfile(key_filename):
raise GerritError("Identity file '%s' does not exist" %
key_filename)