Mercurial > hgrepos > Python > libs > ConfigMix
diff configmix/toml.py @ 653:211288645f02
For better TOML compatibility open TOML files with encoding=""
| author | Franz Glasner <fzglas.hg@dom66.de> |
|---|---|
| date | Thu, 19 May 2022 21:17:39 +0200 |
| parents | f454889e41fa |
| children | 0d6673d06c2c |
line wrap: on
line diff
--- a/configmix/toml.py Fri May 13 19:01:25 2022 +0200 +++ b/configmix/toml.py Thu May 19 21:17:39 2022 +0200 @@ -34,5 +34,6 @@ encoded. """ - with io.open(u2fs(filename), mode="rt", encoding=encoding) as tfp: + with io.open( + u2fs(filename), mode="rt", encoding=encoding, newline="") as tfp: return toml.loads(tfp.read(), _dict=DictImpl)
