py3k syntax compat
diff --git a/OpenSSL/test/test_ssl.py b/OpenSSL/test/test_ssl.py
index 1167496..6132c54 100644
--- a/OpenSSL/test/test_ssl.py
+++ b/OpenSSL/test/test_ssl.py
@@ -4,7 +4,7 @@
 Unit tests for L{OpenSSL.SSL}.
 """
 
-from twisted.internet.ssl import *
+# from twisted.internet.ssl import *
 
 from errno import ECONNREFUSED, EINPROGRESS
 from sys import platform
@@ -37,7 +37,7 @@
 
 
 def verify_cb(conn, cert, errnum, depth, ok):
-    print conn, cert, X509_verify_cert_error_string(errnum), depth, ok
+    print((conn, cert, X509_verify_cert_error_string(errnum), depth, ok))
     return ok
 
 def socket_pair():
diff --git a/OpenSSL/test/util.py b/OpenSSL/test/util.py
index 34585ee..bbe8492 100644
--- a/OpenSSL/test/util.py
+++ b/OpenSSL/test/util.py
@@ -35,7 +35,8 @@
                     os.unlink(temp)
         try:
             _exception_from_error_queue()
-        except Error, e:
+        except Error:
+            e = sys.exc_info()[1]
             if e.args != ([],):
                 self.fail("Left over errors in OpenSSL error queue: " + repr(e))
 
@@ -86,7 +87,8 @@
         """
         try:
             result = f(*args, **kwargs)
-        except exception, inst:
+        except exception:
+            inst = sys.exc_info()[1]
             return inst
         except:
             raise self.failureException('%s raised instead of %s'