From e80739b296fe976c515e854f8b36504787469fa5 Mon Sep 17 00:00:00 2001 From: Pierre Ossman Date: Fri, 4 Dec 2020 13:55:58 +0100 Subject: [PATCH] Add more search paths for rebind.so If we're run as a module then sys.argv[0] will be the main module, not some startup script. --- websockify/websocketproxy.py | 1 + 1 file changed, 1 insertion(+) diff --git a/websockify/websocketproxy.py b/websockify/websocketproxy.py index d3c7130..905e1fd 100644 --- a/websockify/websocketproxy.py +++ b/websockify/websocketproxy.py @@ -293,6 +293,7 @@ class WebSocketProxy(websockifyserver.WebSockifyServer): wsdir = os.path.dirname(sys.argv[0]) rebinder_path = [os.path.join(wsdir, "..", "lib"), os.path.join(wsdir, "..", "lib", "websockify"), + os.path.join(wsdir, ".."), wsdir] self.rebinder = None