fix: Replace bare except with except Exception in get_user_language() method

This commit is contained in:
Paul Gauthier (aider) 2024-08-06 09:48:19 -03:00
parent 541ab83f15
commit 86d37e0c25

View file

@ -745,7 +745,7 @@ class Coder:
lang = locale.getlocale()[0] lang = locale.getlocale()[0]
if lang: if lang:
return lang.split("_")[0] # Extract just the language code return lang.split("_")[0] # Extract just the language code
except: except Exception:
pass pass
for env_var in ["LANG", "LANGUAGE", "LC_ALL", "LC_MESSAGES"]: for env_var in ["LANG", "LANGUAGE", "LC_ALL", "LC_MESSAGES"]: