mirror of
https://github.com/kovidgoyal/calibre.git
synced 2025-07-09 03:04:10 -04:00
Fix #1335468 [Editor: ValueError: No JSON object could be decoded](https://bugs.launchpad.net/calibre/+bug/1335468)
This commit is contained in:
parent
042a4749f7
commit
4ee214295b
@ -409,7 +409,10 @@ class LiveCSS(QWidget):
|
||||
result = unicode(mf.evaluateJavaScript(
|
||||
'window.calibre_preview_integration.live_css(%s, %s)' % (
|
||||
json.dumps(sourceline), json.dumps(tags))).toString())
|
||||
result = json.loads(result)
|
||||
try:
|
||||
result = json.loads(result)
|
||||
except ValueError:
|
||||
result = None
|
||||
if result is not None:
|
||||
maximum_specificities = {}
|
||||
for node in result['nodes']:
|
||||
|
Loading…
x
Reference in New Issue
Block a user