HTTPSd: fix crash of server when no ssl available.

bzr revid: p_christ@hol.gr-20090908081516-hnbdn0mvqfy06qws
This commit is contained in:
P. Christeas
2009-09-08 11:15:16 +03:00
parent b098c935e9
commit 214eb96758
+5 -2
View File
@@ -44,6 +44,11 @@ try:
import fcntl
except ImportError:
fcntl = None
try:
from ssl import SSLError
except ImportError:
class SSLError(Exception): pass
class ThreadedHTTPServer(ConnThreadingMixIn, SimpleXMLRPCDispatcher, HTTPServer):
""" A threaded httpd server, with all the necessary functionality for us.
@@ -145,8 +150,6 @@ class HttpSDaemon(threading.Thread, netsvc.Server):
self.__port = port
self.__interface = interface
from ssl import SSLError
try:
self.server = ThreadedHTTPServer((interface, port), SecureMultiHandler2)
self.server.vdirs = []