mirror of
https://github.com/kovidgoyal/calibre.git
synced 2025-07-09 03:04:10 -04:00
Fix #2572 (Error when Restoring from Tray)
This commit is contained in:
parent
c073180d03
commit
97386ccb9d
@ -61,8 +61,9 @@ def roman(num):
|
||||
|
||||
|
||||
def fmt_sidx(i, fmt='%.2f', use_roman=False):
|
||||
if i is None:
|
||||
if i is None or i == '':
|
||||
i = 1
|
||||
i = float(i)
|
||||
if int(i) == float(i):
|
||||
return roman(int(i)) if use_roman else '%d'%int(i)
|
||||
try:
|
||||
|
Loading…
x
Reference in New Issue
Block a user