Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(103)

Unified Diff: fix_encoding.py

Issue 1843843002: Use getdefaultlocale in fix_encoding (Closed) Base URL: https://chromium.googlesource.com/chromium/tools/depot_tools.git@master
Patch Set: Created 4 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: fix_encoding.py
diff --git a/fix_encoding.py b/fix_encoding.py
index c331820096b91cc5964fa9bf49fe3b24fe99fb5e..107ca6c7d6aa073c756a2a298254f85c9e905581 100644
--- a/fix_encoding.py
+++ b/fix_encoding.py
@@ -51,7 +51,7 @@ def fix_default_encoding():
except locale.Error:
continue
try:
- lang = locale.getlocale(aref)[0]
+ lang, _ = locale.getdefaultlocale()
except (TypeError, ValueError):
continue
if lang:
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698