Merge pull request #88 from dirtbags/v3.3_hotfix

V3.3 hotfix
Fix #86
This commit is contained in:
int00h5525 2019-10-30 10:22:01 -05:00 committed by GitHub
commit 0603f1f980
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 2 additions and 7 deletions

View File

@ -14,6 +14,7 @@ import os
import pathlib import pathlib
import random import random
import shutil import shutil
import socketserver
import sys import sys
import traceback import traceback
import mothballer import mothballer
@ -25,14 +26,8 @@ from http import HTTPStatus
sys.dont_write_bytecode = True # Don't write .pyc files sys.dont_write_bytecode = True # Don't write .pyc files
try:
ThreadingHTTPServer = http.server.ThreadingHTTPServer
except AttributeError:
import socketserver
class ThreadingHTTPServer(socketserver.ThreadingMixIn, http.server.HTTPServer):
daemon_threads = True
class MothServer(ThreadingHTTPServer): class MothServer(socketserver.ForkingMixIn, http.server.HTTPServer):
def __init__(self, server_address, RequestHandlerClass): def __init__(self, server_address, RequestHandlerClass):
super().__init__(server_address, RequestHandlerClass) super().__init__(server_address, RequestHandlerClass)
self.args = {} self.args = {}