From e3d229104adb83cc85fe4f28a78caa4bc6eeef19 Mon Sep 17 00:00:00 2001 From: Safihre Date: Wed, 30 Nov 2016 10:08:58 +0100 Subject: [PATCH] CherryPy 8.1.2 - The .exe shouldn't restart with interpreter args --- cherrypy/process/wspbus.py | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/cherrypy/process/wspbus.py b/cherrypy/process/wspbus.py index 5062055..0b2f169 100644 --- a/cherrypy/process/wspbus.py +++ b/cherrypy/process/wspbus.py @@ -384,7 +384,12 @@ class Bus(object): args = self._get_true_argv() except NotImplementedError: """It's probably win32""" - args = [sys.executable] + _args_from_interpreter_flags() + sys.argv + # For the SABnzbd.exe binary we don't want interpreter flags + # https://github.com/cherrypy/cherrypy/issues/1526 + if getattr(sys, 'frozen', False): + args = [sys.executable] + sys.argv + else: + args = [sys.executable] + _args_from_interpreter_flags() + sys.argv self.log('Re-spawning %s' % ' '.join(args))