Very first step for Windows support
This commit is contained in:
parent
f0bdb0a621
commit
9e2d8b3ca4
|
|
@ -13,9 +13,15 @@ as taken from http://docs.python.org/dev/library/ssl.html#certificates
|
||||||
|
|
||||||
import signal, socket, optparse, time, os, sys, subprocess, logging, errno, ssl
|
import signal, socket, optparse, time, os, sys, subprocess, logging, errno, ssl
|
||||||
try:
|
try:
|
||||||
from socketserver import ForkingMixIn
|
try:
|
||||||
|
from socketserver import ForkingMixIn
|
||||||
|
except ImportError:
|
||||||
|
from socketserver import ThreadingMixIn as ForkingMixIn
|
||||||
except ImportError:
|
except ImportError:
|
||||||
from SocketServer import ForkingMixIn
|
try:
|
||||||
|
from SocketServer import ForkingMixIn
|
||||||
|
except ImportError:
|
||||||
|
from SocketServer import ThreadingMixIn as ForkingMixIn
|
||||||
|
|
||||||
try:
|
try:
|
||||||
from http.server import HTTPServer
|
from http.server import HTTPServer
|
||||||
|
|
|
||||||
|
|
@ -14,6 +14,7 @@ as taken from http://docs.python.org/dev/library/ssl.html#certificates
|
||||||
|
|
||||||
import os, sys, time, errno, signal, socket, select, logging
|
import os, sys, time, errno, signal, socket, select, logging
|
||||||
import multiprocessing
|
import multiprocessing
|
||||||
|
import warnings
|
||||||
|
|
||||||
# Imports that vary by python version
|
# Imports that vary by python version
|
||||||
|
|
||||||
|
|
@ -42,7 +43,8 @@ if sys.platform == 'win32':
|
||||||
import multiprocessing.reduction
|
import multiprocessing.reduction
|
||||||
# the multiprocesssing module behaves much differently on Windows,
|
# the multiprocesssing module behaves much differently on Windows,
|
||||||
# and we have yet to fix all the bugs
|
# and we have yet to fix all the bugs
|
||||||
sys.exit("Windows is not supported at this time")
|
warnings.warn("Windows is not fully supported at this time",
|
||||||
|
category=RuntimeWarning)
|
||||||
|
|
||||||
from websockify.websocket import WebSocket, WebSocketWantReadError, WebSocketWantWriteError
|
from websockify.websocket import WebSocket, WebSocketWantReadError, WebSocketWantWriteError
|
||||||
from websockify.websocketserver import WebSocketRequestHandlerMixIn
|
from websockify.websocketserver import WebSocketRequestHandlerMixIn
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue