Assert that PCI device with specified ID exists.

This commit is contained in:
Filip Strajnar 2024-10-27 10:06:09 +01:00
parent eb1bf1f273
commit 8485c36218

View file

@ -6,6 +6,7 @@ from os import listdir
class PciDevice:
def __init__(self, device_id: str):
assert exists(f"/sys/bus/pci/devices/{self.device_id}")
self.device_id = device_id
def driver_name(self) -> str: