From d7bb4dd988453497f7ca9b167c989640f39d643d Mon Sep 17 00:00:00 2001 From: Clemens Hammacher Date: Fri, 10 Sep 2010 15:43:35 +0200 Subject: [PATCH] ignore malformatted ssh keys and go on with authorized_keys creation Signed-off-by: Clemens Hammacher --- gitosis/ssh.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/gitosis/ssh.py b/gitosis/ssh.py index bfd52fb..f8aba59 100644 --- a/gitosis/ssh.py +++ b/gitosis/ssh.py @@ -32,7 +32,10 @@ def readKeys(keydir): continue line = line.strip() if len(line) > 0: - yield (basename, sshkey.get_ssh_pubkey(line)) + try: + yield (basename, sshkey.get_ssh_pubkey(line)) + except sshkey.MalformedSSHKey as e: + log.warn('Malformed SSH key in %r: %r', filename, e); fp.close() COMMENT = '### autogenerated by gitosis, DO NOT EDIT' -- 2.11.4.GIT