mirror of
https://github.com/kovidgoyal/calibre.git
synced 2025-08-07 09:01:38 -04:00
Also set the restart env var when restarting in debug mode
This commit is contained in:
parent
a6379abb17
commit
c1d6775ef7
@ -355,6 +355,7 @@ def run_in_debug_mode():
|
|||||||
import tempfile, subprocess
|
import tempfile, subprocess
|
||||||
fd, logpath = tempfile.mkstemp('.txt')
|
fd, logpath = tempfile.mkstemp('.txt')
|
||||||
os.close(fd)
|
os.close(fd)
|
||||||
|
os.environ[b'CALIBRE_RESTARTING_FROM_GUI'] = b'1'
|
||||||
run_calibre_debug(
|
run_calibre_debug(
|
||||||
'--gui-debug', logpath, stdout=lopen(logpath, 'w'),
|
'--gui-debug', logpath, stdout=lopen(logpath, 'w'),
|
||||||
stderr=subprocess.STDOUT, stdin=lopen(os.devnull, 'r'))
|
stderr=subprocess.STDOUT, stdin=lopen(os.devnull, 'r'))
|
||||||
|
Loading…
x
Reference in New Issue
Block a user