Pep8 fixes
This commit is contained in:
parent
2dd74f953d
commit
b22c11ab1b
|
@ -27,6 +27,7 @@ import socket
|
||||||
|
|
||||||
SSH_PORT = 22
|
SSH_PORT = 22
|
||||||
|
|
||||||
|
|
||||||
class SSHConfig (object):
|
class SSHConfig (object):
|
||||||
"""
|
"""
|
||||||
Representation of config information as stored in the format used by
|
Representation of config information as stored in the format used by
|
||||||
|
@ -44,7 +45,6 @@ class SSHConfig (object):
|
||||||
"""
|
"""
|
||||||
self._config = []
|
self._config = []
|
||||||
|
|
||||||
|
|
||||||
def parse(self, file_obj):
|
def parse(self, file_obj):
|
||||||
"""
|
"""
|
||||||
Read an OpenSSH config from the given file object.
|
Read an OpenSSH config from the given file object.
|
||||||
|
@ -183,14 +183,14 @@ class SSHConfig (object):
|
||||||
('%l', fqdn),
|
('%l', fqdn),
|
||||||
('%u', user),
|
('%u', user),
|
||||||
('%r', remoteuser)
|
('%r', remoteuser)
|
||||||
]
|
]}
|
||||||
}
|
|
||||||
for k in config:
|
for k in config:
|
||||||
if k in replacements:
|
if k in replacements:
|
||||||
for find, replace in replacements[k]:
|
for find, replace in replacements[k]:
|
||||||
if isinstance(config[k], list):
|
if isinstance(config[k], list):
|
||||||
for item in range(len(config[k])):
|
for item in range(len(config[k])):
|
||||||
config[k][item] = config[k][item].replace(find, str(replace))
|
config[k][item] = config[k][item].\
|
||||||
|
replace(find, str(replace))
|
||||||
else:
|
else:
|
||||||
config[k] = config[k].replace(find, str(replace))
|
config[k] = config[k].replace(find, str(replace))
|
||||||
return config
|
return config
|
||||||
|
|
Loading…
Reference in New Issue