1 |
On 11/14/2015 02:56 PM, Michał Górny wrote: |
2 |
> + |
3 |
> + |
4 |
> +def split_LC_ALL(env): |
5 |
> + """ |
6 |
> + Replace LC_ALL with split-up LC_* variables if it is defined. |
7 |
> + Works on the passed environment (or settings instance). |
8 |
> + """ |
9 |
> + lc_all = env.get("LC_ALL") |
10 |
> + if lc_all is not None: |
11 |
> + for c in locale_categories: |
12 |
> + env[c] = lc_all |
13 |
> + del env["LC_ALL"] |
14 |
> |
15 |
|
16 |
Due to the implementation details of the config.__del__ method, the del |
17 |
call will have an irreversible effect on the config instance. That's |
18 |
bad, because the same config instance is reused for other EAPIs. I think |
19 |
the simplest solution will be to call this function on the "mydict" |
20 |
inside the config.environ() method, since changes to "mydict" only |
21 |
affect the result that is returned from that method. |
22 |
-- |
23 |
Thanks, |
24 |
Zac |