diff options
author | Armin Ronacher <armin.ronacher@active-4.com> | 2013-07-31 22:50:13 +0200 |
---|---|---|
committer | Armin Ronacher <armin.ronacher@active-4.com> | 2013-07-31 22:50:13 +0200 |
commit | 81bd993b278154eb61086bdddbaad22b1e7d68c6 (patch) | |
tree | 96180cc6dde17855955e7965928503b57ecf6ac4 | |
parent | 8b56f05f347b2aa63b6ebec18a323b8a7c667025 (diff) | |
parent | a42ac1bbae0b9dbc618e8a83b4d1315732f402f5 (diff) | |
download | babel-81bd993b278154eb61086bdddbaad22b1e7d68c6.tar.gz |
Merge branch '1.x-maintenance'
-rw-r--r-- | CHANGES | 2 | ||||
-rw-r--r-- | babel/localtime/_win32.py | 9 |
2 files changed, 10 insertions, 1 deletions
@@ -19,6 +19,8 @@ Version 1.4 converted properly by the subtag resolving. This for instance showed up when trying to use ``und_UK`` as a language code which now properly resolves to ``en_GB``. +- Fixed a bug that made it impossible to import the CLDR data + from scratch on windows systems. Version 1.3 ----------- diff --git a/babel/localtime/_win32.py b/babel/localtime/_win32.py index 1f6ecc7..3752dff 100644 --- a/babel/localtime/_win32.py +++ b/babel/localtime/_win32.py @@ -10,7 +10,14 @@ from babel.core import get_global import pytz -tz_names = get_global('windows_zone_mapping') +# When building the cldr data on windows this module gets imported. +# Because at that point there is no global.dat yet this call will +# fail. We want to catch it down in that case then and just assume +# the mapping was empty. +try: + tz_names = get_global('windows_zone_mapping') +except RuntimeError: + tz_names = {} def valuestodict(key): |