This commit is contained in:
Kovid Goyal 2022-07-09 20:31:02 +05:30
parent dcca74027b
commit e4ebd72a69
No known key found for this signature in database
GPG Key ID: 06BC317B515ACE7C
2 changed files with 2 additions and 1 deletions

View File

@ -23,6 +23,7 @@ from polyglot.builtins import iteritems
rendering_composite_name = '__rendering_composite__'
def bool_sort_key(bools_are_tristate):
return (lambda x:{True: 1, False: 2, None: 3}.get(x, 3)) if bools_are_tristate else lambda x:{True: 1, False: 2, None: 2}.get(x, 2)

View File

@ -2245,7 +2245,7 @@ class BuiltinBookCount(BuiltinFormatterFunction):
ids = get_gui().current_db.search_getting_ids(query, None,
use_virtual_library=use_vl != '0')
return len(ids)
except Exception as e:
except Exception:
traceback.print_exc()
return _('This function can be used only in the GUI')