viff

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 diff
     1.1 --- a/viff/runtime.py	Fri Jul 11 23:31:51 2008 +0200
     1.2 +++ b/viff/runtime.py	Sat Jul 12 14:12:11 2008 +0200
     1.3 @@ -1492,13 +1492,8 @@
     1.4  
     1.5      if options and options.tls:
     1.6          print "Using TLS"
     1.7 -        try:
     1.8 -            from gnutls.interfaces.twisted import X509Credentials
     1.9 -            from gnutls.crypto import X509Certificate, X509PrivateKey
    1.10 -        except ImportError:
    1.11 -            # TODO: Return a failed Deferred instead.
    1.12 -            print "Could not import Python GNUTLS module, aborting!"
    1.13 -            return
    1.14 +        from gnutls.interfaces.twisted import X509Credentials
    1.15 +        from gnutls.crypto import X509Certificate, X509PrivateKey
    1.16  
    1.17          # TODO: Make the file names configurable.
    1.18          cert = X509Certificate(open('player-%d.cert' % id).read())