Correctly assert existance of device.
This commit is contained in:
parent
7e21cf58ea
commit
0a346daaa7
|
|
@ -5,7 +5,7 @@ from os import listdir
|
||||||
class PciDevice:
|
class PciDevice:
|
||||||
|
|
||||||
def __init__(self, device_id: str):
|
def __init__(self, device_id: str):
|
||||||
assert exists(f"/sys/bus/pci/devices/{self.device_id}")
|
assert exists(f"/sys/bus/pci/devices/{device_id}")
|
||||||
self.device_id = device_id
|
self.device_id = device_id
|
||||||
|
|
||||||
def driver_name(self) -> str:
|
def driver_name(self) -> str:
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue