Fix None type exception when there's no localedir.

This commit is contained in:
John Ralls 2014-04-21 13:21:32 -07:00
parent 8a98d800f4
commit 50f0936914

View File

@ -526,7 +526,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: