mirror of
git://github.com/kovidgoyal/calibre.git
synced 2025-12-31 01:26:14 +01: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
1 changed files with 1 additions and 1 deletions
|
|
@ -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…
Reference in a new issue