mirror of
https://github.com/kernelkit/infix.git
synced 2026-07-22 01:13:00 +02:00
test: infamy: return None if port doesn't exist
Follow-up to e4535aa, allowing tests to be even simpler.
Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
This commit is contained in:
committed by
Tobias Waldekranz
parent
5bf9200880
commit
dc5c7732d7
@@ -56,7 +56,9 @@ class Transport(ABC):
|
||||
pass
|
||||
|
||||
def __getitem__(self, key):
|
||||
return self.mapping[key]
|
||||
if key in self.mapping:
|
||||
return self.mapping[key]
|
||||
return None
|
||||
|
||||
def get_iface(self, name):
|
||||
"""Fetch target dict for iface and extract param from JSON"""
|
||||
|
||||
Reference in New Issue
Block a user