mirror of
https://github.com/kovidgoyal/calibre.git
synced 2025-07-09 03:04:10 -04:00
Add option to not turn on debug mode
This commit is contained in:
parent
57aed7e1aa
commit
1660f2377d
@ -59,6 +59,7 @@ as a shebang in scripts, like this:
|
|||||||
help=_('Run the GUI with a debug console, logging to the'
|
help=_('Run the GUI with a debug console, logging to the'
|
||||||
' specified path. For internal use only, use the -g'
|
' specified path. For internal use only, use the -g'
|
||||||
' option to run the GUI in debug mode'))
|
' option to run the GUI in debug mode'))
|
||||||
|
parser.add_option('--run-without-debug', default=False, action='store_true', help=_('Dont run python code with the DEBUG flag set'))
|
||||||
parser.add_option('-w', '--viewer', default=False, action='store_true',
|
parser.add_option('-w', '--viewer', default=False, action='store_true',
|
||||||
help=_('Run the E-book viewer in debug mode'))
|
help=_('Run the E-book viewer in debug mode'))
|
||||||
parser.add_option('--paths', default=False, action='store_true',
|
parser.add_option('--paths', default=False, action='store_true',
|
||||||
@ -218,7 +219,8 @@ def main(args=sys.argv):
|
|||||||
sys.argv = [sys.argv[0], '--multiprocessing-fork']
|
sys.argv = [sys.argv[0], '--multiprocessing-fork']
|
||||||
exec(args[-1])
|
exec(args[-1])
|
||||||
return
|
return
|
||||||
debug()
|
if not opts.run_without_debug:
|
||||||
|
debug()
|
||||||
if opts.gui:
|
if opts.gui:
|
||||||
from calibre.gui_launch import calibre
|
from calibre.gui_launch import calibre
|
||||||
calibre(['calibre'] + args[1:])
|
calibre(['calibre'] + args[1:])
|
||||||
|
Loading…
x
Reference in New Issue
Block a user