Mercurial > babel > old > babel-test
diff babel/core.py @ 535:2cfe20fd80a0 stable-0.9.x
merge r586 from trunk
author | fschwarz |
---|---|
date | Fri, 11 Mar 2011 16:25:08 +0000 |
parents | 8da9e83f6df8 |
children |
line wrap: on
line diff
--- a/babel/core.py +++ b/babel/core.py @@ -642,7 +642,10 @@ locale = 'en_US_POSIX' elif aliases and locale in aliases: locale = aliases[locale] - return '_'.join(filter(None, parse_locale(locale))) + try: + return '_'.join(filter(None, parse_locale(locale))) + except ValueError: + pass def negotiate_locale(preferred, available, sep='_', aliases=LOCALE_ALIASES): """Find the best match between available and requested locale strings.