We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 9ecd4f4 commit 0705fb0Copy full SHA for 0705fb0
python/cocotbext/cocotbext/nfb/ext/grpc/nfb.py
@@ -71,8 +71,12 @@ def _comp_addr(self, path):
71
while p:
72
compatible = p.get_property("compatible")
73
if compatible and compatible.value == "netcope,bus,mi":
74
- m = re.search(r'PCI(?P<pci>\d+),BAR(?P<bar>\d+)', p.get_property("resource").value)
75
- pci, _ = int(m.group('pci')), int(m.group('bar'))
+ resource = p.get_property("resource")
+ if resource is not None:
76
+ m = re.search(r'PCI(?P<pci>\d+),BAR(?P<bar>\d+)', resource.value)
77
+ pci, _ = int(m.group('pci')), int(m.group('bar'))
78
+ else:
79
+ pci, _ = 0, 0
80
mi = self._dev.mi[pci]
81
break
82
p = p.parent
0 commit comments