You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
@@ -111,54 +114,18 @@ While Python 3.7 and newer use UTF-8 mode by default, it does not set up an erro
111
114
112
115
As it happens, some older tools output ISO-8859-1 characters hard-coded and these aren't valid UTF-8 sequences, and even newer Python versions need error handlers to not fail:
113
116
114
-
```py
117
+
```sh
115
118
echo -e "\0262"# ISO-8859-1 for: "²"
116
119
python3 -c 'open(".text").read()'
120
+
```
121
+
122
+
```
117
123
Traceback (most recent call last):
118
124
File "<string>", line 1, in<module>
119
125
File "<frozen codecs>", line 322, in decode
120
126
UnicodeDecodeError: 'utf-8' codec can't decode byte 0xb2 in position 0: invalid start byte
121
127
```
122
128
123
-
```py
124
-
pylint -d all-e unspecified-encoding --msg-template="{path} line {line} in {obj}()" xcp/ tests/
125
-
************* Module xcp.accessor
126
-
xcp/accessor.py line 165in MountingAccessor.writeFile()
127
-
xcp/accessor.py line 240in FileAccessor.writeFile()
128
-
************* Module xcp.bootloader
129
-
xcp/bootloader.py line 111in Bootloader.readExtLinux()
130
-
xcp/bootloader.py line 219in Bootloader.readGrub()
131
-
xcp/bootloader.py line 335in Bootloader.readGrub2()
132
-
xcp/bootloader.py line 465in Bootloader.writeExtLinux()
133
-
xcp/bootloader.py line 507in Bootloader.writeGrub()
134
-
xcp/bootloader.py line 541in Bootloader.writeGrub2()
135
-
************* Module xcp.cmd
136
-
xcp/cmd.py line 67in OutputCache.fileContents()
137
-
************* Module xcp.dom0
138
-
xcp/dom0.py line 85in default_memory()
139
-
************* Module xcp.environ
140
-
xcp/environ.py line 48in readInventory()
141
-
************* Module xcp.logger
142
-
xcp/logger.py line 51in openLog()
143
-
************* Module xcp.net.ifrename.dynamic
144
-
xcp/net/ifrename/dynamic.py line 95in DynamicRules.load_and_parse()
145
-
xcp/net/ifrename/dynamic.py line 292in DynamicRules.save()
146
-
************* Module xcp.net.ifrename.static
147
-
xcp/net/ifrename/static.py line 118in StaticRules.load_and_parse()
148
-
xcp/net/ifrename/static.py line 330in StaticRules.save()
149
-
************* Module tests.test_biosdevname
150
-
tests/test_biosdevname.py line 30in TestDeviceNames.test()
151
-
tests/test_biosdevname.py line 32in TestDeviceNames.test()
152
-
************* Module tests.test_bootloader
153
-
tests/test_bootloader.py line 32in TestLinuxBootloader.setUp()
154
-
tests/test_bootloader.py line 34in TestLinuxBootloader.setUp()
155
-
tests/test_bootloader.py line 36in TestLinuxBootloader.setUp()
156
-
tests/test_bootloader.py line 38in TestLinuxBootloader.setUp()
157
-
************* Module tests.test_pci
158
-
tests/test_pci.py line 96in TestPCIIds.test_videoclass_by_mock_calls()
159
-
tests/test_pci.py line 110in TestPCIIds.mock_lspci_using_open_testfile()
160
-
```
161
-
162
129
Of course, `xcp/net/ifrename` won't be affected but it would be good to fix the
163
130
warning for them as well in an intelligent way. See the proposal for that below.
0 commit comments