mirror of
git://github.com/kovidgoyal/calibre.git
synced 2026-05-01 04:35:31 +02:00
Fix #2572 (Error when Restoring from Tray)
This commit is contained in:
parent
c073180d03
commit
97386ccb9d
1 changed files with 2 additions and 1 deletions
|
|
@ -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…
Reference in a new issue