summaryrefslogtreecommitdiff
path: root/tests/test_bio_ssl.py
diff options
context:
space:
mode:
authorCraig Rodrigues <rodrigc@FreeBSD.org>2015-11-13 05:46:46 -0800
committerMatěj Cepl <mcepl@cepl.eu>2015-11-16 21:49:54 +0100
commit4964fb10003bc8e06e546b62431e2a38a1f4a180 (patch)
treef998eb8914d46680b8e7d0e17aa0b1209d66fa29 /tests/test_bio_ssl.py
parent227aeb7966f9b5d41c6988cf53c05aa536334a7e (diff)
downloadm2crypto-4964fb10003bc8e06e546b62431e2a38a1f4a180.tar.gz
Use print as a function for Python 3. [PEP 3105]
For Python 2 compatibility, import print_function from the __future__ module. This works as far back as Python 2.6.0a2: https://docs.python.org/2/library/__future__.html
Diffstat (limited to 'tests/test_bio_ssl.py')
-rw-r--r--tests/test_bio_ssl.py4
1 files changed, 3 insertions, 1 deletions
diff --git a/tests/test_bio_ssl.py b/tests/test_bio_ssl.py
index f2d6aac..13278c5 100644
--- a/tests/test_bio_ssl.py
+++ b/tests/test_bio_ssl.py
@@ -1,4 +1,6 @@
#!/usr/bin/env python
+from __future__ import print_function
+
"""Unit tests for M2Crypto.BIO.File.
Copyright (c) 1999-2002 Ng Pheng Siong. All rights reserved."""
@@ -44,7 +46,7 @@ class HandshakeClient(threading.Thread):
if ret <= 0:
if not sslbio.should_retry() or not sslbio.should_read():
err_string = Err.get_error()
- print err_string
+ print(err_string)
sys.exit("unrecoverable error in handshake - client")
else:
output_token = writebio.read()