From 107833667a2b2445f2de4224829f4d9eaa6e73d0 Mon Sep 17 00:00:00 2001 From: Tommi Virtanen Date: Sun, 18 Nov 2007 18:08:09 +0200 Subject: Let *.pub files have multiple lines, each containing one SSH key. Makes managing accounts and access for people with multiple client machines easier. --- gitosis/ssh.py | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) (limited to 'gitosis/ssh.py') diff --git a/gitosis/ssh.py b/gitosis/ssh.py index 7a70ed4..3eb5c37 100644 --- a/gitosis/ssh.py +++ b/gitosis/ssh.py @@ -13,12 +13,10 @@ def readKeys(keydir): path = os.path.join(keydir, filename) f = file(path) - try: - line = f.readline() - finally: - f.close() - line = line.rstrip('\n') - yield (basename, line) + for line in f: + line = line.rstrip('\n') + yield (basename, line) + f.close() COMMENT = '### autogenerated by gitosis, DO NOT EDIT' -- cgit v1.2.3