changeset 816:370cc9481a4a

Let a gnutls ImportError pass through to the caller. This fixes Issue 35.
author Martin Geisler <mg@daimi.au.dk>
date Sat, 12 Jul 2008 14:12:11 +0200
parents 197d2d7bcbf7
children 8f2fef319cb7
files viff/runtime.py
diffstat 1 files changed, 2 insertions(+), 7 deletions(-) [+]
line wrap: on
line diff
--- a/viff/runtime.py	Fri Jul 11 23:31:51 2008 +0200
+++ b/viff/runtime.py	Sat Jul 12 14:12:11 2008 +0200
@@ -1492,13 +1492,8 @@
 
     if options and options.tls:
         print "Using TLS"
-        try:
-            from gnutls.interfaces.twisted import X509Credentials
-            from gnutls.crypto import X509Certificate, X509PrivateKey
-        except ImportError:
-            # TODO: Return a failed Deferred instead.
-            print "Could not import Python GNUTLS module, aborting!"
-            return
+        from gnutls.interfaces.twisted import X509Credentials
+        from gnutls.crypto import X509Certificate, X509PrivateKey
 
         # TODO: Make the file names configurable.
         cert = X509Certificate(open('player-%d.cert' % id).read())