Added keyword argument to function for clarification

This commit is contained in:
Sebastian Lohff 2012-06-26 02:19:04 +02:00
parent 18775c5c72
commit 12169eafe4
1 changed files with 5 additions and 3 deletions

View File

@ -799,11 +799,13 @@ class ServeFile():
if not self._getKey(): if not self._getKey():
self.genKeyPair() self.genKeyPair()
try: try:
server = SecureThreadedHTTPServer(self._getCert(), self._getKey(), (listenIp, self.port), handler, False) server = SecureThreadedHTTPServer(self._getCert(), self._getKey(),
(listenIp, self.port), handler, bind_and_activate=False)
except SSL.Error as e: except SSL.Error as e:
raise ServeFileException("SSL Error: Could not read SSL public/private key from file(s) (error was: \"%s\")" % (e[0][0][2],)) raise ServeFileException("SSL error: Could not read SSL public/private key from file(s) (error was: \"%s\")" % (e[0][0][2],))
else: else:
server = ThreadedHTTPServer((listenIp, self.port), handler, False) server = ThreadedHTTPServer((listenIp, self.port), handler,
bind_and_activate=False)
if withv6: if withv6:
server.socket.setsockopt(socket.IPPROTO_IPV6, socket.IPV6_V6ONLY, 1) server.socket.setsockopt(socket.IPPROTO_IPV6, socket.IPV6_V6ONLY, 1)