Permalink
Browse files

re-enabled HTTPS code in core.py, but wrapped it in a try ... except …

…and added a print statement to suggest ^D if HTTPS is not needed/wanted...
  • Loading branch information...
1 parent f0a915c commit b7c9427fbc08b8c35f44e05c3ebc6c16e25af43b @stighackvan stighackvan committed Mar 19, 2011
Showing with 7 additions and 3 deletions.
  1. +7 −3 core.py
View
10 core.py
@@ -158,9 +158,13 @@ def onAttend(key):
if os.environ.get('INSECURE',False):
reactor.listenTCP(10081, server.Site(sroot))
-# reactor.listenSSL(10443, server.Site(sroot), \
-# secure.ServerContextFactory(myKey='certs/server.pem', trustedCA='certs/certificate_authority/shdh-ca.pem'))
-
+ print "just type ^D if you don't want to use the HTTPS port...it's optional..."
+ try:
+ reactor.listenSSL(10443, server.Site(sroot), \
+ secure.ServerContextFactory(myKey='certs/server.pem', trustedCA='certs/certificate_authority/shdh-ca.pem'))
+ except:
+ print "couldn't start SSL server... missing certs/server.pem???\n python says:", sys.exc_info()
+
reactor.listenTCP(10080, server.Site(iroot))
log.msg("It's a piece of cake to break a pretty snake. [SYSTEM ONLINE]")

0 comments on commit b7c9427

Please sign in to comment.