Assert that PCI device with specified ID exists.
This commit is contained in:
parent
eb1bf1f273
commit
8485c36218
|
|
@ -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:
|
||||
|
|
|
|||
Loading…
Reference in a new issue