mirror of
https://github.com/kovidgoyal/calibre.git
synced 2026-05-27 17:22:34 -04:00
Fix #2052 (Improve error handling in get_results method)
This commit is contained in:
@@ -20,6 +20,9 @@ from calibre.utils.search_query_parser import SearchQueryParser
|
||||
|
||||
|
||||
def comparable_price(text):
|
||||
if isinstance(text, (int, float)):
|
||||
text = str(text)
|
||||
text = text or ''
|
||||
# this keep thousand and fraction separators
|
||||
match = re.search(r'(?:\d|[,.](?=\d))(?:\d*(?:[,.\' ](?=\d))?)+', text)
|
||||
if match:
|
||||
|
||||
Reference in New Issue
Block a user