Fix a regression in 8.1 that broke displaying of the debug log when running in debug mode

This commit is contained in:
Kovid Goyal 2025-04-15 07:06:57 +05:30
parent e93aabdd7f
commit 04f7f6ca72
No known key found for this signature in database
GPG Key ID: 06BC317B515ACE7C

View File

@ -375,11 +375,10 @@ class GuiRunner(QObject):
def run_in_debug_mode():
import subprocess
import tempfile
from calibre.constants import cache_dir
from calibre.debug import run_calibre_debug
fd, logpath = tempfile.mkstemp('.txt')
os.close(fd)
logpath = os.path.join(cache_dir(), 'calibre-debug-log.txt')
run_calibre_debug(
'--gui-debug', logpath, stdout=open(logpath, 'wb'),
stderr=subprocess.STDOUT, stdin=open(os.devnull, 'rb'))