mirror of
https://github.com/kovidgoyal/calibre.git
synced 2025-07-09 03:04:10 -04:00
Fix #1969981 [Conversion to PDF fails with "TypeError: '<=' not supported between instances of 'str' and 'float'"](https://bugs.launchpad.net/calibre/+bug/1969981)
This commit is contained in:
parent
69ab397165
commit
86373bac9b
@ -338,9 +338,9 @@ class CSSFlattener:
|
||||
if '%' in cssdict[property]:
|
||||
continue
|
||||
value = style[property]
|
||||
if value == 0:
|
||||
if value == 0 or not isinstance(value, numbers.Number):
|
||||
continue
|
||||
elif value <= slineh:
|
||||
if value <= slineh:
|
||||
cssdict[property] = "%0.5fem" % (dlineh / fsize)
|
||||
else:
|
||||
try:
|
||||
|
Loading…
x
Reference in New Issue
Block a user