Skip to content

Commit bbc199e

Browse files
xcp/dmv.py: Fixup CI errors
Signed-off-by: Bernhard Kaindl <[email protected]>
1 parent 257e113 commit bbc199e

File tree

1 file changed

+38
-36
lines changed

1 file changed

+38
-36
lines changed

xcp/dmv.py

Lines changed: 38 additions & 36 deletions
Original file line numberDiff line numberDiff line change
@@ -21,13 +21,14 @@
2121
# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
2222
# SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
2323

24-
import os
25-
import subprocess
24+
import errno
25+
import glob
2626
import json
27+
import os
2728
import re
2829
import struct
29-
import glob
30-
import errno
30+
import subprocess
31+
from typing import Any, Dict
3132

3233
from .compat import open_with_codec_handling
3334

@@ -91,37 +92,36 @@ def id_matches(id1, id2):
9192
return True
9293
return id1 == id2
9394

94-
'''
95-
driver_pci_ids example:
96-
{
97-
"abc.ko": [
98-
{
99-
"vendor_id": "14e4",
100-
"device_id": "163c",
101-
"subvendor_id": "*",
102-
"subdevice_id": "*"
103-
},
104-
{
105-
"vendor_id": "14e4",
106-
"device_id": "163b",
107-
"subvendor_id": "*",
108-
"subdevice_id": "*"
109-
}],
110-
"de.ko": [
111-
{
112-
"vendor_id": "eees",
113-
"device_id": "163c",
114-
"subvendor_id": "*",
115-
"subdevice_id": "*"
116-
},
117-
{
118-
"vendor_id": "14f4",
119-
"device_id": "16db",
120-
"subvendor_id": "2123",
121-
"subdevice_id": "1123"
122-
}]
123-
}
124-
'''
95+
96+
# driver_pci_ids example:
97+
# {
98+
# "abc.ko": [
99+
# {
100+
# "vendor_id": "14e4",
101+
# "device_id": "163c",
102+
# "subvendor_id": "*",
103+
# "subdevice_id": "*"
104+
# },
105+
# {
106+
# "vendor_id": "14e4",
107+
# "device_id": "163b",
108+
# "subvendor_id": "*",
109+
# "subdevice_id": "*"
110+
# }],
111+
# "de.ko": [
112+
# {
113+
# "vendor_id": "eees",
114+
# "device_id": "163c",
115+
# "subvendor_id": "*",
116+
# "subdevice_id": "*"
117+
# },
118+
# {
119+
# "vendor_id": "14f4",
120+
# "device_id": "16db",
121+
# "subvendor_id": "2123",
122+
# "subdevice_id": "1123"
123+
# }]
124+
# }
125125
def pci_matches(present_pci_id, driver_pci_ids):
126126
"""Check if present PCI ID matches any of the driver PCI IDs."""
127127
merged_driver_pci_id_list = []
@@ -236,6 +236,8 @@ def parse_dmv_info(self, fpath):
236236
return json_data, json_formatted
237237

238238
class DriverMultiVersionManager(object):
239+
dmv_list = {} # type: Dict[str, Any]
240+
239241
def __init__(self, runtime=False):
240242
self.runtime = runtime
241243
self.dmv_list = {
@@ -296,7 +298,7 @@ def parse_dmv_list(self):
296298
for _, updates_dir, dmv_dir in get_all_kabi_dirs():
297299
if not os.path.isdir(dmv_dir):
298300
continue
299-
301+
300302
for path, _, files in os.walk(dmv_dir):
301303
if "info.json" not in files:
302304
continue

0 commit comments

Comments
 (0)