summaryrefslogtreecommitdiff
path: root/cloudinit/ssh_util.py
diff options
context:
space:
mode:
authorScott Moser <smoser@ubuntu.com>2013-03-07 14:54:25 -0500
committerScott Moser <smoser@ubuntu.com>2013-03-07 14:54:25 -0500
commitdca9b6c94e10f9f42ad0f129ae6fd38ebb44f4b5 (patch)
tree0b4ac8f1e658e07bda378c75b5fb33940a14265b /cloudinit/ssh_util.py
parent90ed3dee9672ba2756dd4a303f94e3de47e70404 (diff)
downloadcloud-init-git-dca9b6c94e10f9f42ad0f129ae6fd38ebb44f4b5.tar.gz
pep8 and pylint fixes
Diffstat (limited to 'cloudinit/ssh_util.py')
-rw-r--r--cloudinit/ssh_util.py10
1 files changed, 4 insertions, 6 deletions
diff --git a/cloudinit/ssh_util.py b/cloudinit/ssh_util.py
index 65fab117..95133236 100644
--- a/cloudinit/ssh_util.py
+++ b/cloudinit/ssh_util.py
@@ -19,9 +19,6 @@
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
-from StringIO import StringIO
-
-import csv
import os
import pwd
@@ -42,6 +39,7 @@ VALID_KEY_TYPES = ("rsa", "dsa", "ssh-rsa", "ssh-dss", "ecdsa",
"ecdsa-sha2-nistp384-cert-v01@openssh.com",
"ecdsa-sha2-nistp521-cert-v01@openssh.com")
+
class AuthKeyLine(object):
def __init__(self, source, keytype=None, base64=None,
comment=None, options=None):
@@ -141,14 +139,14 @@ class AuthKeyLineParser(object):
ent = line.strip()
try:
(keytype, base64, comment) = parse_ssh_key(ent)
- except TypeError as e:
+ except TypeError:
(keyopts, remain) = self._extract_options(ent)
if options is None:
options = keyopts
-
+
try:
(keytype, base64, comment) = parse_ssh_key(remain)
- except TypeError as e:
+ except TypeError:
return AuthKeyLine(src_line)
return AuthKeyLine(src_line, keytype=keytype, base64=base64,