HTTPSd: fix crash of server when no ssl available.
bzr revid: p_christ@hol.gr-20090908081516-hnbdn0mvqfy06qws
This commit is contained in:
@@ -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 = []
|
||||
|
||||
Reference in New Issue
Block a user