diff options
author | Narayan Desai <desai@mcs.anl.gov> | 2004-11-08 20:59:47 +0000 |
---|---|---|
committer | Narayan Desai <desai@mcs.anl.gov> | 2004-11-08 20:59:47 +0000 |
commit | ee9c1c6fdbdd8ff4cae32689e3620e5a75ff506b (patch) | |
tree | 387659abf78c160bffa99bbf802da219466f9143 /src/lib/Server/Generators/SSHbase.py | |
parent | ec6ab83ab433934f92596fb94e33ad4bdfbc3156 (diff) | |
download | bcfg2-ee9c1c6fdbdd8ff4cae32689e3620e5a75ff506b.tar.gz bcfg2-ee9c1c6fdbdd8ff4cae32689e3620e5a75ff506b.tar.bz2 bcfg2-ee9c1c6fdbdd8ff4cae32689e3620e5a75ff506b.zip |
pylint fixes
(Logical change 1.148)
git-svn-id: https://svn.mcs.anl.gov/repos/bcfg/trunk/bcfg2@652 ce84e21b-d406-0410-9b95-82705330c041
Diffstat (limited to 'src/lib/Server/Generators/SSHbase.py')
-rw-r--r-- | src/lib/Server/Generators/SSHbase.py | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/src/lib/Server/Generators/SSHbase.py b/src/lib/Server/Generators/SSHbase.py index 5a23fdbca..eab268ec0 100644 --- a/src/lib/Server/Generators/SSHbase.py +++ b/src/lib/Server/Generators/SSHbase.py @@ -51,7 +51,7 @@ class SSHbase(Generator): client = metadata.hostname filedata = self.repository.entries['ssh_known_hosts'].data ipaddr = gethostbyname(client) - keylist = [x % client for x in self.pubkeys] + keylist = [keytmpl % client for keytmpl in self.pubkeys] for hostkey in keylist: filedata += "%s,%s,%s %s" % (client, "%s.mcs.anl.gov"%(client), ipaddr, self.repository.entries[hostkey].data) @@ -80,17 +80,17 @@ class SSHbase(Generator): output = '' for filename, entry in self.repository.entries.iteritems(): if ".pub.H_" in filename: - h = filename.split('_')[-1] + hname = filename.split('_')[-1] try: - ipaddr = gethostbyname(h) - output += "%s,%s.mcs.anl.gov,%s %s" % (h, h, ipaddr, entry.data) + ipaddr = gethostbyname(hname) + output += "%s,%s.mcs.anl.gov,%s %s" % (hname, hname, ipaddr, entry.data) except gaierror: continue self.repository.entries['ssh_known_hosts'].data = output def GenerateHostKeys(self, client): '''Generate new host keys for client''' - keylist = [x % client for x in self.hostkeys] + keylist = [keytmpl % client for keytmpl in self.hostkeys] for hostkey in keylist: if 'ssh_host_rsa_key.H_' in hostkey: keytype = 'rsa' |