Skip to content

Commit a36f5a5

Browse files
committed
Catch exception from getdefaultlocale
1 parent 1b7bfae commit a36f5a5

1 file changed

Lines changed: 4 additions & 1 deletion

File tree

tkfilebrowser/constants.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -78,7 +78,10 @@
7878

7979

8080
# --- translation
81-
LANG = locale.getdefaultlocale()[0]
81+
try:
82+
LANG = locale.getdefaultlocale()[0]
83+
except ValueError:
84+
LANG = 'en'
8285

8386
EN = {}
8487
FR = {"B": "octets", "MB": "Mo", "kB": "ko", "GB": "Go", "TB": "To",

0 commit comments

Comments
 (0)