Use subprocess.Popen on windows to restart PlexPy

* See python bug: https://bugs.python.org/issue19066
This commit is contained in:
JonnyWong16 2016-02-23 18:29:33 -08:00
commit eedd0d9c07

View file

@ -890,7 +890,13 @@ def shutdown(restart=False, update=False):
if '--nolaunch' not in args:
args += ['--nolaunch']
logger.info('Restarting PlexPy with %s', args)
os.execv(exe, args)
# os.execv fails with spaced names on Windows
# https://bugs.python.org/issue19066
if os.name == 'nt':
subprocess.Popen(args, cwd=os.getcwd())
else:
os.execv(exe, args)
os._exit(0)