From 76716f6a4e6e53b32476a8c81bdeb18e5b7b993c Mon Sep 17 00:00:00 2001 From: David Pursehouse Date: Wed, 11 Sep 2013 18:52:22 +0900 Subject: 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 --- pygerrit/ssh.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'pygerrit/ssh.py') 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) -- cgit v1.2.1