Skip to content

Commit 837581b

Browse files
kanavinencukou
andauthored
Update Lib/test/test_asyncio/utils.py
Co-authored-by: Petr Viktorin <[email protected]>
1 parent be2c50f commit 837581b

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

Lib/test/test_asyncio/utils.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,8 @@ def data_file(*filename):
5656
ONLYKEY = data_file('certdata', 'ssl_key.pem')
5757
SIGNED_CERTFILE = data_file('certdata', 'keycert3.pem')
5858
SIGNING_CA = data_file('certdata', 'pycacert.pem')
59-
PEERCERT = eval(open(data_file('certdata', 'keycert3.pem.reference')).read())
59+
with open(data_file('certdata', 'keycert3.pem.reference')) as file:
60+
PEERCERT = literal_eval(file.read())
6061

6162
def simple_server_sslcontext():
6263
server_context = ssl.SSLContext(ssl.PROTOCOL_TLS_SERVER)

0 commit comments

Comments
 (0)