diff options
author | Craig Rodrigues <rodrigc@FreeBSD.org> | 2015-11-13 05:46:46 -0800 |
---|---|---|
committer | Matěj Cepl <mcepl@cepl.eu> | 2015-11-16 21:49:54 +0100 |
commit | 4964fb10003bc8e06e546b62431e2a38a1f4a180 (patch) | |
tree | f998eb8914d46680b8e7d0e17aa0b1209d66fa29 /tests/test_ssl.py | |
parent | 227aeb7966f9b5d41c6988cf53c05aa536334a7e (diff) | |
download | m2crypto-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_ssl.py')
-rw-r--r-- | tests/test_ssl.py | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/tests/test_ssl.py b/tests/test_ssl.py index 5b72bf5..c8beed0 100644 --- a/tests/test_ssl.py +++ b/tests/test_ssl.py @@ -1,5 +1,7 @@ #!/usr/bin/env python +from __future__ import print_function + """Unit tests for M2Crypto.SSL. Copyright (c) 2000-2004 Ng Pheng Siong. All rights reserved. @@ -422,7 +424,7 @@ class MiscSSLClientTestCase(BaseSSLClientTestCase): self.assertRaises(SSL.SSLError, s.connect, self.srv_addr) s.close() except Exception as ex: - print('Caught exception %s' % ex) + print(('Caught exception %s' % ex)) raise finally: self.stop_server(pid) |