Skip to content

Commit

Permalink
[Util] Refactor reset language env vars
Browse files Browse the repository at this point in the history
  • Loading branch information
cas-- committed Aug 24, 2024
1 parent 18fa028 commit af70ff1
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions deluge/i18n/util.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit af70ff1

Please sign in to comment.