mirror of
https://github.com/wxWidgets/Phoenix.git
synced 2025-12-16 09:40:07 +01:00
Merge pull request #1411 from wxWidgets/fix-locale-error
Handle a ValueError from locale.getlocale()
(cherry picked from commit 4353c7deb6)
This commit is contained in:
@@ -522,7 +522,10 @@ def run():
|
||||
body="""\
|
||||
self.ResetLocale()
|
||||
import locale
|
||||
loc, enc = locale.getlocale()
|
||||
try:
|
||||
loc, enc = locale.getlocale()
|
||||
except ValueError:
|
||||
loc = enc = None
|
||||
# Try to set it to the same language as what is already set in the C locale
|
||||
info = wx.Locale.FindLanguageInfo(loc) if loc else None
|
||||
if info:
|
||||
|
||||
Reference in New Issue
Block a user