mirror of
https://github.com/kovidgoyal/calibre.git
synced 2025-07-08 10:44:09 -04:00
Avoid error print on shutdown
This commit is contained in:
parent
26b44e936c
commit
1d64be1032
@ -190,7 +190,7 @@ class UrlSchemeHandler(QWebEngineUrlSchemeHandler):
|
||||
QTimer.singleShot(0, self.check_for_parse)
|
||||
else:
|
||||
data = get_data(name)
|
||||
if isinstance(data, type('')):
|
||||
if isinstance(data, unicode_type):
|
||||
data = data.encode('utf-8')
|
||||
mime_type = {
|
||||
# Prevent warning in console about mimetype of fonts
|
||||
|
@ -143,6 +143,7 @@ def live_css(editor_name, sourceline, tags):
|
||||
for node in document.querySelectorAll(f'[data-lnum="{sourceline}"]'):
|
||||
tn = node.tagName.toLowerCase() if node.tagName else ''
|
||||
if tn is not tags[i]:
|
||||
if to_python.live_css_data:
|
||||
to_python.live_css_data(ans)
|
||||
return
|
||||
i += 1
|
||||
@ -162,6 +163,7 @@ def live_css(editor_name, sourceline, tags):
|
||||
})
|
||||
target = target.parentNode
|
||||
ancestor_specificity += 1
|
||||
if to_python.live_css_data:
|
||||
to_python.live_css_data(ans)
|
||||
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user