From ae8bd2d4e0b7783afb5085785985f07201492fb7 Mon Sep 17 00:00:00 2001 From: John Ralls Date: Mon, 4 Feb 2013 01:42:51 +0000 Subject: [PATCH] GrampsLocale: Allow for importing older PyICU packages svn: r21287 --- gramps/gen/utils/grampslocale.py | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/gramps/gen/utils/grampslocale.py b/gramps/gen/utils/grampslocale.py index ae39434b4..ee7d30d19 100644 --- a/gramps/gen/utils/grampslocale.py +++ b/gramps/gen/utils/grampslocale.py @@ -39,8 +39,12 @@ HAVE_ICU = False try: from icu import Locale, Collator HAVE_ICU = True -except ImportError as err: - LOG.warning("ICU is not installed because %s, localization will be impaired", str(err)) +except ImportError: + try: + from PyICU import Locale, Collator + HAVE_ICU = True + except ImportError as err: + LOG.warning("ICU is not installed because %s, localization will be impaired", str(err)) #------------------------------------------------------------------------- # # gramps modules