mirror of
https://github.com/Tautulli/Tautulli.git
synced 2025-08-14 02:26:58 -07:00
Use subprocess.Popen on windows to restart PlexPy
* See python bug: https://bugs.python.org/issue19066
This commit is contained in:
parent
9ef389d335
commit
eedd0d9c07
1 changed files with 7 additions and 1 deletions
|
@ -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)
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue