From ee9c1c6fdbdd8ff4cae32689e3620e5a75ff506b Mon Sep 17 00:00:00 2001 From: Narayan Desai Date: Mon, 8 Nov 2004 20:59:47 +0000 Subject: pylint fixes (Logical change 1.148) git-svn-id: https://svn.mcs.anl.gov/repos/bcfg/trunk/bcfg2@652 ce84e21b-d406-0410-9b95-82705330c041 --- src/lib/Server/Generators/SSHbase.py | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'src/lib/Server/Generators/SSHbase.py') 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' -- cgit v1.2.3-1-g7c22