From af70ff1fdc69d021071df16c00682d8bcd6990ba Mon Sep 17 00:00:00 2001 From: Calum Lind Date: Sat, 24 Aug 2024 13:52:24 +0100 Subject: [PATCH] [Util] Refactor reset language env vars --- deluge/i18n/util.py | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/deluge/i18n/util.py b/deluge/i18n/util.py index f553dc8fb..b79d9b77a 100644 --- a/deluge/i18n/util.py +++ b/deluge/i18n/util.py @@ -66,9 +66,8 @@ def set_language(lang): :type lang: str """ if not lang: - for lang_env_var in ['LANGUAGE', 'LANG']: - if lang_env_var in os.environ: - del os.environ[lang_env_var] + os.environ.pop('LANGUAGE', None) + os.environ.pop('LANG', None) return # Necessary to set these environment variables for GtkBuilder