Commit 88f46f1
committed
Improve the handling of non-ASCII config files
Config files are now assumed to be encoded as utf-8,
just like Python 3 source files.
If decoding does not work, we also try with latin-1,
mostly to support legacy configuration files.
Also moved reading the config file to a separate method
that can be overridden when needed.1 parent 260edf1 commit 88f46f1
1 file changed
Lines changed: 18 additions & 2 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
132 | 132 | | |
133 | 133 | | |
134 | 134 | | |
135 | | - | |
136 | | - | |
| 135 | + | |
137 | 136 | | |
138 | 137 | | |
139 | 138 | | |
| |||
158 | 157 | | |
159 | 158 | | |
160 | 159 | | |
| 160 | + | |
| 161 | + | |
| 162 | + | |
| 163 | + | |
| 164 | + | |
| 165 | + | |
| 166 | + | |
| 167 | + | |
| 168 | + | |
| 169 | + | |
| 170 | + | |
| 171 | + | |
| 172 | + | |
| 173 | + | |
| 174 | + | |
| 175 | + | |
| 176 | + | |
161 | 177 | | |
162 | 178 | | |
163 | 179 | | |
| |||
0 commit comments