mirror of
https://github.com/ansible-collections/community.general.git
synced 2025-10-12 19:34:02 -07:00
PEP 8 E111 & E114 cleanup. (#20838)
This commit is contained in:
parent
1609afbd12
commit
cb76200c7d
119 changed files with 339 additions and 378 deletions
|
@ -123,11 +123,11 @@ class PublicKey(object):
|
|||
|
||||
if not os.path.exists(self.path) or self.force:
|
||||
try:
|
||||
privatekey_content = open(self.privatekey_path, 'r').read()
|
||||
privatekey = crypto.load_privatekey(crypto.FILETYPE_PEM, privatekey_content)
|
||||
publickey_file = open(self.path, 'w')
|
||||
publickey_file.write(crypto.dump_publickey(crypto.FILETYPE_PEM, privatekey))
|
||||
publickey_file.close()
|
||||
privatekey_content = open(self.privatekey_path, 'r').read()
|
||||
privatekey = crypto.load_privatekey(crypto.FILETYPE_PEM, privatekey_content)
|
||||
publickey_file = open(self.path, 'w')
|
||||
publickey_file.write(crypto.dump_publickey(crypto.FILETYPE_PEM, privatekey))
|
||||
publickey_file.close()
|
||||
except (IOError, OSError):
|
||||
e = get_exception()
|
||||
raise PublicKeyError(e)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue