PEP 8 E111 & E114 cleanup. (#20838)

This commit is contained in:
Matt Clay 2017-01-30 15:01:47 -08:00 committed by GitHub
commit cb76200c7d
119 changed files with 339 additions and 378 deletions

View file

@ -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)