diff --git a/src/calibre/utils/icu.py b/src/calibre/utils/icu.py index 24c3450b97..510ae675ed 100644 --- a/src/calibre/utils/icu.py +++ b/src/calibre/utils/icu.py @@ -83,10 +83,7 @@ def collator(strength=None, numeric=None, ignore_alternate_chars=None, upper_fir if upper_first is not None: ans.upper_first = upper_first if ignore_alternate_chars is not None: - try: - ans.set_attribute(_icu.UCOL_ALTERNATE_HANDLING, _icu.UCOL_SHIFTED if ignore_alternate_chars else _icu.UCOL_NON_IGNORABLE) - except AttributeError: - pass # people running from source without latest binary + ans.set_attribute(_icu.UCOL_ALTERNATE_HANDLING, _icu.UCOL_SHIFTED if ignore_alternate_chars else _icu.UCOL_NON_IGNORABLE) thread_local_collator_cache.cache[key] = ans return ans