mirror of
https://github.com/kovidgoyal/calibre.git
synced 2025-07-09 03:04:10 -04:00
Fix comparison of console log level
This commit is contained in:
parent
c2fef7f5ec
commit
0ec88750b6
@ -138,7 +138,7 @@ document.title = 'compiler initialized';
|
||||
QApplication.instance().processEvents(QEventLoop.ProcessEventsFlag.ExcludeUserInputEvents)
|
||||
|
||||
def javaScriptConsoleMessage(self, level, msg, line_num, source_id):
|
||||
if level:
|
||||
if level == QWebEnginePage.JavaScriptConsoleMessageLevel.ErrorMessageLevel:
|
||||
self.errors.append(msg)
|
||||
else:
|
||||
print(f'{source_id}:{line_num}:{msg}')
|
||||
@ -409,7 +409,7 @@ def run_rapydscript_tests():
|
||||
self.working = False
|
||||
|
||||
def javaScriptConsoleMessage(self, level, msg, line_num, source_id):
|
||||
print(msg, file=sys.stderr if level > 0 else sys.stdout)
|
||||
print(msg, file=sys.stdout if level == QWebEnginePage.JavaScriptConsoleMessageLevel.InfoMessageLevel else sys.stderr)
|
||||
|
||||
tester = Tester()
|
||||
result = tester.spin_loop()
|
||||
|
Loading…
x
Reference in New Issue
Block a user