mirror of
https://github.com/kovidgoyal/calibre.git
synced 2025-07-09 03:04:10 -04:00
Fix #817
This commit is contained in:
parent
b49e8b9f9d
commit
9c3bc20cb8
@ -285,7 +285,7 @@ def normalize_settings(parser, opts):
|
|||||||
for opt in parser.option_list:
|
for opt in parser.option_list:
|
||||||
if not opt.dest:
|
if not opt.dest:
|
||||||
continue
|
continue
|
||||||
if getattr(opts, opt.dest) == opt.default:
|
if getattr(opts, opt.dest) == opt.default and hasattr(saved_opts, opt.dest):
|
||||||
continue
|
continue
|
||||||
setattr(saved_opts, opt.dest, getattr(opts, opt.dest))
|
setattr(saved_opts, opt.dest, getattr(opts, opt.dest))
|
||||||
return saved_opts
|
return saved_opts
|
||||||
|
@ -36,7 +36,7 @@ class MainWindow(QMainWindow):
|
|||||||
|
|
||||||
def __init__(self, opts, parent=None):
|
def __init__(self, opts, parent=None):
|
||||||
QMainWindow.__init__(self, parent)
|
QMainWindow.__init__(self, parent)
|
||||||
if opts.redirect:
|
if getattr(opts, 'redirect', False):
|
||||||
self.__console_redirect = DebugWindow(self)
|
self.__console_redirect = DebugWindow(self)
|
||||||
sys.stdout = sys.stderr = self.__console_redirect
|
sys.stdout = sys.stderr = self.__console_redirect
|
||||||
self.__console_redirect.show()
|
self.__console_redirect.show()
|
||||||
|
Loading…
x
Reference in New Issue
Block a user