[issue37198] _parse_localename fail to parse 'US_IL'

2019-06-07 Thread Michele Angrisano


Michele Angrisano  added the comment:

Hi Hodai, thank you for the report.
Would you be interested to propose a Pull Request for this issue?

You can read the devguide for more informations.

Thank you. :)

--
nosy: +lemburg, mangrisano

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue37198] _parse_localename fail to parse 'US_IL'

2019-06-07 Thread hodai goldman


New submission from hodai goldman :

_parse_localename fail to parse 'US_IL':

Traceback (most recent call last):
  File "/usr/bin/flowblade", line 78, in 
app.main(modules_path)
  File "/usr/share/flowblade/Flowblade/app.py", line 194, in main
translations.init_languages()
  File "/usr/share/flowblade/Flowblade/translations.py", line 39, in 
init_languages
lc, encoding = locale.getdefaultlocale()
  File "/usr/lib/python2.7/locale.py", line 545, in getdefaultlocale
return _parse_localename(localename)
  File "/usr/lib/python2.7/locale.py", line 477, in _parse_localename
raise ValueError, 'unknown locale: %s' % localename
ValueError: unknown locale: en_IL


need to add another check for '_' separator, code:

if '.' in code:
return tuple(code.split('.')[:2])

--
messages: 344966
nosy: hodai goldman
priority: normal
severity: normal
status: open
title: _parse_localename fail to parse 'US_IL'
type: crash
versions: Python 2.7

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com