[maclocale] Fix none type has no len().

Fixes #11075
This commit is contained in:
John Ralls 2019-03-26 08:52:29 -07:00
parent 450217a636
commit c615b4dc32

View File

@ -266,7 +266,7 @@ def mac_setup_localization(glocale):
LOG.debug("No supported languages found in $LANGUAGE")
if not (language and language[0]):
translations = _mac_language_list()
if len(translations) > 0:
if translations and len(translations) > 0:
language = translations
LOG.debug("Returning Translations %s", ':'.join(translations))