summaryrefslogtreecommitdiffstats
path: root/src/lib/Server/Plugins/SSHbase.py
diff options
context:
space:
mode:
authorSol Jerome <solj@ices.utexas.edu>2009-10-07 14:46:08 +0000
committerSol Jerome <solj@ices.utexas.edu>2009-10-07 14:46:08 +0000
commiteac52c270b8b3b10e461bc46502b64c5f898bd7d (patch)
tree96da2e78af41305b445de23596b75bf754eedbbc /src/lib/Server/Plugins/SSHbase.py
parente686d3b69600441e943c2913542e5477af528d87 (diff)
downloadbcfg2-eac52c270b8b3b10e461bc46502b64c5f898bd7d.tar.gz
bcfg2-eac52c270b8b3b10e461bc46502b64c5f898bd7d.tar.bz2
bcfg2-eac52c270b8b3b10e461bc46502b64c5f898bd7d.zip
Pylint/PEP 8 Code cleanups
Signed-off-by: Sol Jerome <solj@ices.utexas.edu> git-svn-id: https://svn.mcs.anl.gov/repos/bcfg/trunk/bcfg2@5477 ce84e21b-d406-0410-9b95-82705330c041
Diffstat (limited to 'src/lib/Server/Plugins/SSHbase.py')
-rw-r--r--src/lib/Server/Plugins/SSHbase.py17
1 files changed, 9 insertions, 8 deletions
diff --git a/src/lib/Server/Plugins/SSHbase.py b/src/lib/Server/Plugins/SSHbase.py
index 388cc53fc..a3690a05a 100644
--- a/src/lib/Server/Plugins/SSHbase.py
+++ b/src/lib/Server/Plugins/SSHbase.py
@@ -8,6 +8,7 @@ import tempfile
from subprocess import Popen, PIPE
import Bcfg2.Server.Plugin
+
class SSHbase(Bcfg2.Server.Plugin.Plugin,
Bcfg2.Server.Plugin.Generator,
Bcfg2.Server.Plugin.DirectoryBacked,
@@ -54,13 +55,13 @@ class SSHbase(Bcfg2.Server.Plugin.Plugin,
self.logger.error(ioerr)
raise Bcfg2.Server.Plugin.PluginInitError
self.Entries = {'ConfigFile':
- {'/etc/ssh/ssh_known_hosts':self.build_skn,
- '/etc/ssh/ssh_host_dsa_key':self.build_hk,
- '/etc/ssh/ssh_host_rsa_key':self.build_hk,
- '/etc/ssh/ssh_host_dsa_key.pub':self.build_hk,
- '/etc/ssh/ssh_host_rsa_key.pub':self.build_hk,
- '/etc/ssh/ssh_host_key':self.build_hk,
- '/etc/ssh/ssh_host_key.pub':self.build_hk}}
+ {'/etc/ssh/ssh_known_hosts': self.build_skn,
+ '/etc/ssh/ssh_host_dsa_key': self.build_hk,
+ '/etc/ssh/ssh_host_rsa_key': self.build_hk,
+ '/etc/ssh/ssh_host_dsa_key.pub': self.build_hk,
+ '/etc/ssh/ssh_host_rsa_key.pub': self.build_hk,
+ '/etc/ssh/ssh_host_key': self.build_hk,
+ '/etc/ssh/ssh_host_key.pub': self.build_hk}}
self.ipcache = {}
self.__skn = False
@@ -209,7 +210,7 @@ class SSHbase(Bcfg2.Server.Plugin.Plugin,
"H_%s" % client])
tempdir = tempfile.mkdtemp()
temploc = "%s/%s" % (tempdir, hostkey)
- cmd = 'ssh-keygen -q -f %s -N "" -t %s -C root@%s < /dev/null'
+ cmd = 'ssh-keygen -q -f %s -N "" -t %s -C root@%s < /dev/null'
os.system(cmd % (temploc, keytype, client))
open(fileloc, 'w').write(open(temploc).read())
open(publoc, 'w').write(open("%s.pub" % temploc).read())