From 0828b207be9f7a57ca4797eb4627b1546074a274 Mon Sep 17 00:00:00 2001 From: Valentin Lorentz Date: Sun, 24 Nov 2019 12:46:10 +0100 Subject: [PATCH] Add fallback if getting supybot.language from registry cache failed. --- src/i18n.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/i18n.py b/src/i18n.py index 1b702035f..59eb45083 100644 --- a/src/i18n.py +++ b/src/i18n.py @@ -57,7 +57,10 @@ def getLocaleFromRegistryCache(): loaded.""" global currentLocale import supybot.registry as registry - currentLocale = registry._cache['supybot.language'] + try: + currentLocale = registry._cache['supybot.language'] + except KeyError: + pass def import_conf(): """Imports the conf into this module"""