Commit 534a6657 authored by Vincent Pelletier's avatar Vincent Pelletier

client: Use file as a context manager.

parent d45a12a2
......@@ -110,7 +110,8 @@ class CaucaseClient(object):
Return whether an update happened.
"""
if os.path.exists(crl_path):
my_crl = utils.load_crl(open(crl_path, 'rb').read(), ca_list)
with open(crl_path, 'rb') as crl_file:
my_crl = utils.load_crl(crl_file.read(), ca_list)
else:
my_crl = None
latest_crl_pem = cls(ca_url=url).getCertificateRevocationList()
......
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