diff options
author | Narayan Desai <desai@mcs.anl.gov> | 2005-10-24 21:22:15 +0000 |
---|---|---|
committer | Narayan Desai <desai@mcs.anl.gov> | 2005-10-24 21:22:15 +0000 |
commit | 73898c3d20de00f39d5144b55318bc7ded89de23 (patch) | |
tree | 68591eea91c29f72f2263ecb58d9ce655c96b49c /src/lib/Server/Plugins/SSHbase.py | |
parent | 07a028a8487fb9fdd4b57db0275ce76bfa879c03 (diff) | |
download | bcfg2-73898c3d20de00f39d5144b55318bc7ded89de23.tar.gz bcfg2-73898c3d20de00f39d5144b55318bc7ded89de23.tar.bz2 bcfg2-73898c3d20de00f39d5144b55318bc7ded89de23.zip |
pylint fixups
(Logical change 1.343)
git-svn-id: https://svn.mcs.anl.gov/repos/bcfg/trunk/bcfg2@1416 ce84e21b-d406-0410-9b95-82705330c041
Diffstat (limited to 'src/lib/Server/Plugins/SSHbase.py')
-rw-r--r-- | src/lib/Server/Plugins/SSHbase.py | 8 |
1 files changed, 3 insertions, 5 deletions
diff --git a/src/lib/Server/Plugins/SSHbase.py b/src/lib/Server/Plugins/SSHbase.py index c8c5a4544..9c7fb9357 100644 --- a/src/lib/Server/Plugins/SSHbase.py +++ b/src/lib/Server/Plugins/SSHbase.py @@ -2,9 +2,8 @@ __revision__ = '$Revision: 1.56 $' from binascii import b2a_base64 -from os import rename, system, popen +from os import system, popen from socket import gethostbyname, gaierror -from time import sleep from Bcfg2.Server.Plugin import Plugin, DirectoryBacked, PluginExecutionError @@ -63,7 +62,7 @@ class SSHbase(Plugin): self.ipcache[client] = (ipaddr, client) return (ipaddr, client) except gaierror: - pass + (client) try: ipaddr = popen("getent hosts %s" % client).read().strip().split() except: @@ -106,7 +105,6 @@ class SSHbase(Plugin): self.GenerateHostKeys(client) if hasattr(self, 'static_skn'): del self.static_skn - times = 0 if not self.repository.entries.has_key(filename): self.LogError("%s still not registered" % filename) raise PluginExecutionError @@ -134,7 +132,7 @@ class SSHbase(Plugin): if hostkey not in self.repository.entries.keys(): fileloc = "%s/%s" % (self.data, hostkey) publoc = self.data + '/' + ".".join([hostkey.split('.')[0]]+['pub', "H_%s" % client]) - temploc = "/tmp/%s" % hostkey + temploc = "/tmp/%s" % hostkey system('ssh-keygen -q -f %s -N "" -t %s -C root@%s < /dev/null' % (temploc, keytype, client)) open(fileloc, 'w').write(open(temploc).read()) open(publoc, 'w').write(open("%s.pub" % temploc).read()) |