diff options
author | Robin H. Johnson <robbat2@gentoo.org> | 2008-02-03 00:13:03 -0800 |
---|---|---|
committer | Robin H. Johnson <robbat2@gentoo.org> | 2008-02-03 00:13:03 -0800 |
commit | 231e601545d0a09d84d3c5c2786d774f56fe9217 (patch) | |
tree | 750dc8698badb3befbecb58882192542df030ff8 | |
parent | Use a valid algo typo for ssh. (diff) | |
download | gitosis-dakkar-231e601545d0a09d84d3c5c2786d774f56fe9217.tar.gz gitosis-dakkar-231e601545d0a09d84d3c5c2786d774f56fe9217.tar.bz2 gitosis-dakkar-231e601545d0a09d84d3c5c2786d774f56fe9217.zip |
Avoid trailing whitespace messing up the keyname.
-rw-r--r-- | gitosis/init.py | 1 | ||||
-rw-r--r-- | gitosis/sshkey.py | 2 |
2 files changed, 2 insertions, 1 deletions
diff --git a/gitosis/init.py b/gitosis/init.py index 105ac4c..ceeaba6 100644 --- a/gitosis/init.py +++ b/gitosis/init.py @@ -140,6 +140,7 @@ class Main(app.App): user = _.username else: user = options.adminname + user = user.strip() if user is None: log.error('Cannot parse user from SSH public key.') sys.exit(1) diff --git a/gitosis/sshkey.py b/gitosis/sshkey.py index 145d746..802145b 100644 --- a/gitosis/sshkey.py +++ b/gitosis/sshkey.py @@ -141,7 +141,7 @@ def _explode_ssh_key(line): Seperately return the options, key data and comment. """ opts = {} - shl = shlex(StringIO(line), None, True) + shl = shlex(StringIO(line.strip()), None, True) shl.wordchars += '-' # Treat ',' as whitespace seperation the options shl.whitespace += ',' |