Also set the restart env var when restarting in debug mode

This commit is contained in:
Kovid Goyal 2017-06-23 18:06:16 +05:30
parent a6379abb17
commit c1d6775ef7
No known key found for this signature in database
GPG Key ID: 06BC317B515ACE7C

View File

@ -355,6 +355,7 @@ def run_in_debug_mode():
import tempfile, subprocess
fd, logpath = tempfile.mkstemp('.txt')
os.close(fd)
os.environ[b'CALIBRE_RESTARTING_FROM_GUI'] = b'1'
run_calibre_debug(
'--gui-debug', logpath, stdout=lopen(logpath, 'w'),
stderr=subprocess.STDOUT, stdin=lopen(os.devnull, 'r'))