Add fallback if getting supybot.language from registry cache failed.

This commit is contained in:
Valentin Lorentz 2019-11-24 12:46:10 +01:00
parent 423a38770b
commit 0828b207be

View File

@ -57,7 +57,10 @@ def getLocaleFromRegistryCache():
loaded.""" loaded."""
global currentLocale global currentLocale
import supybot.registry as registry import supybot.registry as registry
currentLocale = registry._cache['supybot.language'] try:
currentLocale = registry._cache['supybot.language']
except KeyError:
pass
def import_conf(): def import_conf():
"""Imports the conf into this module""" """Imports the conf into this module"""