Commit 3a87b272 by Toshio Kuratomi

Fix format strings for python2.6

parent ee74eec9
...@@ -102,7 +102,7 @@ class VaultLib(object): ...@@ -102,7 +102,7 @@ class VaultLib(object):
cipher = globals()['Vault' + self.cipher_name] cipher = globals()['Vault' + self.cipher_name]
this_cipher = cipher() this_cipher = cipher()
else: else:
raise errors.AnsibleError("{} cipher could not be found".format(self.cipher_name)) raise errors.AnsibleError("{0} cipher could not be found".format(self.cipher_name))
""" """
# combine sha + data # combine sha + data
...@@ -135,7 +135,7 @@ class VaultLib(object): ...@@ -135,7 +135,7 @@ class VaultLib(object):
cipher = globals()['Vault' + ciphername] cipher = globals()['Vault' + ciphername]
this_cipher = cipher() this_cipher = cipher()
else: else:
raise errors.AnsibleError("{} cipher could not be found".format(ciphername)) raise errors.AnsibleError("{0} cipher could not be found".format(ciphername))
# try to unencrypt data # try to unencrypt data
data = this_cipher.decrypt(data, self.password) data = this_cipher.decrypt(data, self.password)
...@@ -379,7 +379,7 @@ class VaultAES(object): ...@@ -379,7 +379,7 @@ class VaultAES(object):
d = d_i = b'' d = d_i = b''
while len(d) < key_length + iv_length: while len(d) < key_length + iv_length:
text = "{}{}{}".format(d_i, password, salt) text = "{0}{1}{2}".format(d_i, password, salt)
d_i = md5(to_bytes(text)).digest() d_i = md5(to_bytes(text)).digest()
d += d_i d += d_i
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment