()
| 343 | |
| 344 | # fix locale for kconfiglib |
| 345 | def kconfiglib_fix_locale(): |
| 346 | import os |
| 347 | import locale |
| 348 | |
| 349 | # Get the list of supported locales |
| 350 | supported_locales = set(locale.locale_alias.keys()) |
| 351 | |
| 352 | # Check if LANG is set and its value is not in the supported locales |
| 353 | if 'LANG' in os.environ and os.environ['LANG'] not in supported_locales: |
| 354 | os.environ['LANG'] = 'C' |
| 355 | |
| 356 | |
| 357 | def kconfiglib_check_installed(): |