diff options
author | Cosimo Cecchi <cosimo.cecchi@collabora.co.uk> | 2010-09-15 11:37:07 +0200 |
---|---|---|
committer | Cosimo Cecchi <cosimo.cecchi@collabora.co.uk> | 2010-09-15 11:37:07 +0200 |
commit | f956ba40fdc8a5832c3d99c76a3a49521bc37a6c (patch) | |
tree | 9fb51c25ad0224c92027826a16e5e831fc001fe8 | |
parent | 055e764881a7f3a1de83a5bde8e0e934cdc2663d (diff) | |
download | telepathy-gabble-f956ba40fdc8a5832c3d99c76a3a49521bc37a6c.tar.gz |
Don't call close() when using the with keyword
-rw-r--r-- | tests/twisted/tls/server-tls-channel.py | 2 |
1 files changed, 0 insertions, 2 deletions
diff --git a/tests/twisted/tls/server-tls-channel.py b/tests/twisted/tls/server-tls-channel.py index f9d7872b9..1f59ea0d5 100644 --- a/tests/twisted/tls/server-tls-channel.py +++ b/tests/twisted/tls/server-tls-channel.py @@ -63,12 +63,10 @@ class TlsAuthenticator(XmppAuthenticator): def tlsAuth(self, auth): with open(CA_KEY, 'rb') as file: pem_key = file.read() - file.close() pkey = crypto.load_privatekey(crypto.FILETYPE_PEM, pem_key, "") with open(CA_CERT, 'rb') as file: pem_cert = file.read() - file.close() cert = crypto.load_certificate(crypto.FILETYPE_PEM, pem_cert) tls_ctx = ssl.CertificateOptions(privateKey=pkey, certificate=cert) |