diff options
author | Mike Milner <mike.milner@canonical.com> | 2012-01-17 13:39:37 -0400 |
---|---|---|
committer | Mike Milner <mike.milner@canonical.com> | 2012-01-17 13:39:37 -0400 |
commit | 69d6195ec6a37dc7a8f045fc262c74d01624eb56 (patch) | |
tree | 303ed83b05fdac41604ff3ad7c83c8c8046462eb /cloudinit/SshUtil.py | |
parent | f52ffe2dda01dd0314523fcac559e6f3fbb3578e (diff) | |
parent | 1d00c0936bfc63117493d89268da8c81611b3c40 (diff) | |
download | vyos-cloud-init-69d6195ec6a37dc7a8f045fc262c74d01624eb56.tar.gz vyos-cloud-init-69d6195ec6a37dc7a8f045fc262c74d01624eb56.zip |
Merge from trunk.
Diffstat (limited to 'cloudinit/SshUtil.py')
-rw-r--r-- | cloudinit/SshUtil.py | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/cloudinit/SshUtil.py b/cloudinit/SshUtil.py index fdd3bb27..125ca618 100644 --- a/cloudinit/SshUtil.py +++ b/cloudinit/SshUtil.py @@ -46,7 +46,7 @@ class AuthKeyEntry(): elif curc == '"': quoted = not quoted i = i + 1 - except IndexError as e: + except IndexError: self.is_comment = True return() @@ -54,7 +54,7 @@ class AuthKeyEntry(): self.options = ent[0:i] (self.keytype, self.base64, self.comment) = \ ent[i+1:].split(None,3) - except ValueError as e: + except ValueError: # we did not understand this line self.is_comment = True @@ -84,7 +84,7 @@ def update_authorized_keys(fname, keys): fp = open(fname, "r") lines = fp.readlines() # lines have carriage return fp.close() - except IOError as e: + except IOError: lines = [ ] ka_stats = { } # keys_added status @@ -133,7 +133,7 @@ def setup_user_keys(keys, user, key_prefix, log=None): akeys = akeys.replace("%h", pwent.pw_dir) akeys = akeys.replace("%u", user) authorized_keys = akeys - except Exception as e: + except Exception: authorized_keys = '%s/.ssh/authorized_keys' % pwent.pw_dir if log: util.logexc(log) |