mirror of
https://github.com/kovidgoyal/calibre.git
synced 2025-07-08 18:54: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)
|
QTimer.singleShot(0, self.check_for_parse)
|
||||||
else:
|
else:
|
||||||
data = get_data(name)
|
data = get_data(name)
|
||||||
if isinstance(data, type('')):
|
if isinstance(data, unicode_type):
|
||||||
data = data.encode('utf-8')
|
data = data.encode('utf-8')
|
||||||
mime_type = {
|
mime_type = {
|
||||||
# Prevent warning in console about mimetype of fonts
|
# 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}"]'):
|
for node in document.querySelectorAll(f'[data-lnum="{sourceline}"]'):
|
||||||
tn = node.tagName.toLowerCase() if node.tagName else ''
|
tn = node.tagName.toLowerCase() if node.tagName else ''
|
||||||
if tn is not tags[i]:
|
if tn is not tags[i]:
|
||||||
|
if to_python.live_css_data:
|
||||||
to_python.live_css_data(ans)
|
to_python.live_css_data(ans)
|
||||||
return
|
return
|
||||||
i += 1
|
i += 1
|
||||||
@ -162,6 +163,7 @@ def live_css(editor_name, sourceline, tags):
|
|||||||
})
|
})
|
||||||
target = target.parentNode
|
target = target.parentNode
|
||||||
ancestor_specificity += 1
|
ancestor_specificity += 1
|
||||||
|
if to_python.live_css_data:
|
||||||
to_python.live_css_data(ans)
|
to_python.live_css_data(ans)
|
||||||
|
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user