Pep8 fixes
This commit is contained in:
parent
85551dffd6
commit
42d77483e8
|
@ -26,7 +26,6 @@ import os
|
||||||
import re
|
import re
|
||||||
import socket
|
import socket
|
||||||
|
|
||||||
|
|
||||||
SSH_PORT = 22
|
SSH_PORT = 22
|
||||||
proxy_re = re.compile(r"^(proxycommand)\s*=*\s*(.*)", re.I)
|
proxy_re = re.compile(r"^(proxycommand)\s*=*\s*(.*)", re.I)
|
||||||
|
|
||||||
|
@ -85,7 +84,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.
|
||||||
|
@ -235,12 +233,14 @@ class SSHConfig (object):
|
||||||
('%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