From 5f3f280ea00c38fdea0c70abc58f3a6feba6ef76 Mon Sep 17 00:00:00 2001 From: John Ralls Date: Mon, 21 Apr 2014 13:21:32 -0700 Subject: [PATCH] Fix None type exception when there's no localedir. --- gramps/gen/utils/grampslocale.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/gramps/gen/utils/grampslocale.py b/gramps/gen/utils/grampslocale.py index f832d0371..cf9a2f1fa 100644 --- a/gramps/gen/utils/grampslocale.py +++ b/gramps/gen/utils/grampslocale.py @@ -533,7 +533,7 @@ class GrampsLocale(object): # _init_secondary_locale if this comes up empty. if localedir and os.path.exists(os.path.abspath(localedir)): self.localedir = localedir - elif (_first and hasattr(_first, 'localedir') and + elif (_first and hasattr(_first, 'localedir') and _first.localedir and os.path.exists(os.path.abspath(_first.localedir))): self.localedir = _first.localedir else: