From c1d6775ef753c092c12aa5b6f041b7bc806210ad Mon Sep 17 00:00:00 2001 From: Kovid Goyal Date: Fri, 23 Jun 2017 18:06:16 +0530 Subject: [PATCH] Also set the restart env var when restarting in debug mode --- src/calibre/gui2/main.py | 1 + 1 file changed, 1 insertion(+) diff --git a/src/calibre/gui2/main.py b/src/calibre/gui2/main.py index c5f5171ed2..6240c59369 100644 --- a/src/calibre/gui2/main.py +++ b/src/calibre/gui2/main.py @@ -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'))