diff options
author | alexbodn@gmail.com <alexbodn@gmail.com> | 2016-08-06 15:42:31 +0300 |
---|---|---|
committer | alexbodn@gmail.com <alexbodn@gmail.com> | 2016-08-06 15:42:31 +0300 |
commit | 26dd4baf47ed7753b2843a7e4eed46d1ea25880a (patch) | |
tree | 504c263d8e319e1c0cccb69c857d9e0d99798bdb /pint/systems.py | |
parent | 79d446a116a23aea8cda676f5dbe390ab7dc283a (diff) | |
download | pint-26dd4baf47ed7753b2843a7e4eed46d1ea25880a.tar.gz |
adjusted to cope with upstream babel tip
Diffstat (limited to 'pint/systems.py')
-rw-r--r-- | pint/systems.py | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/pint/systems.py b/pint/systems.py index 43a7ecc..95ea978 100644 --- a/pint/systems.py +++ b/pint/systems.py @@ -15,7 +15,8 @@ import re from .unit import Definition, UnitDefinition, DefinitionSyntaxError, RedefinitionError from .util import to_units_container, SharedRegistryObject, SourceIterator -from .babel_names import babel_systems +from .babel_names import _babel_systems +from pint.compat import Loc class _Group(SharedRegistryObject): @@ -337,8 +338,9 @@ class _System(SharedRegistryObject): :type locale: Locale """ - if locale and self.name in babel_systems: - name = babel_systems[self.name] + if locale and self.name in _babel_systems: + name = _babel_systems[self.name] + locale = Loc.parse(locale) return locale.measurement_systems[name] return self.name |