This commit is contained in:
Kovid Goyal 2008-06-25 13:31:38 -07:00
parent b49e8b9f9d
commit 9c3bc20cb8
2 changed files with 2 additions and 2 deletions

View File

@ -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

View File

@ -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()