mirror of
https://github.com/kovidgoyal/calibre.git
synced 2025-07-09 03:04:10 -04:00
Fix a regression in 8.1 that broke displaying of the debug log when running in debug mode
This commit is contained in:
parent
e93aabdd7f
commit
04f7f6ca72
@ -375,11 +375,10 @@ class GuiRunner(QObject):
|
|||||||
|
|
||||||
def run_in_debug_mode():
|
def run_in_debug_mode():
|
||||||
import subprocess
|
import subprocess
|
||||||
import tempfile
|
|
||||||
|
|
||||||
|
from calibre.constants import cache_dir
|
||||||
from calibre.debug import run_calibre_debug
|
from calibre.debug import run_calibre_debug
|
||||||
fd, logpath = tempfile.mkstemp('.txt')
|
logpath = os.path.join(cache_dir(), 'calibre-debug-log.txt')
|
||||||
os.close(fd)
|
|
||||||
run_calibre_debug(
|
run_calibre_debug(
|
||||||
'--gui-debug', logpath, stdout=open(logpath, 'wb'),
|
'--gui-debug', logpath, stdout=open(logpath, 'wb'),
|
||||||
stderr=subprocess.STDOUT, stdin=open(os.devnull, 'rb'))
|
stderr=subprocess.STDOUT, stdin=open(os.devnull, 'rb'))
|
||||||
|
Loading…
x
Reference in New Issue
Block a user