mirror of
https://github.com/kovidgoyal/calibre.git
synced 2025-07-09 03:04:10 -04:00
Fix #1914954 [ValueError: could not convert string to float: 'XV'](https://bugs.launchpad.net/calibre/+bug/1914954)
This commit is contained in:
parent
2e0b2d1573
commit
3746562f81
@ -220,7 +220,7 @@ def fmt_sidx(i, fmt='%.2f', use_roman=False):
|
||||
i = 1
|
||||
try:
|
||||
i = float(i)
|
||||
except TypeError:
|
||||
except Exception:
|
||||
return unicode_type(i)
|
||||
if int(i) == float(i):
|
||||
return roman(int(i)) if use_roman else '%d'%int(i)
|
||||
|
Loading…
x
Reference in New Issue
Block a user