Pep8 fixes

This commit is contained in:
Olle Lundberg 2012-10-16 15:00:02 +02:00
parent 85551dffd6
commit 42d77483e8
1 changed files with 10 additions and 10 deletions

View File

@ -26,7 +26,6 @@ import os
import re
import socket
SSH_PORT = 22
proxy_re = re.compile(r"^(proxycommand)\s*=*\s*(.*)", re.I)
@ -85,7 +84,6 @@ class SSHConfig (object):
"""
self._config = []
def parse(self, file_obj):
"""
Read an OpenSSH config from the given file object.
@ -235,12 +233,14 @@ class SSHConfig (object):
('%r', remoteuser),
],
}
for k in config:
if k in replacements:
for find, replace in replacements[k]:
if isinstance(config[k], list):
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:
config[k] = config[k].replace(find, str(replace))
return config