mirror of
https://github.com/systemd/systemd.git
synced 2026-08-09 17:38:42 +00:00
test-network: read link attribute at any depth
This commit is contained in:
@@ -216,8 +216,8 @@ def tearDownModule():
|
||||
for u in running_units:
|
||||
check_output(f'systemctl start {u}')
|
||||
|
||||
def read_link_attr(link, dev, attribute):
|
||||
with open(os.path.join(os.path.join(os.path.join('/sys/class/net/', link), dev), attribute)) as f:
|
||||
def read_link_attr(*args):
|
||||
with open(os.path.join('/sys/class/net/', *args)) as f:
|
||||
return f.readline().strip()
|
||||
|
||||
def read_bridge_port_attr(bridge, link, attribute):
|
||||
|
||||
Reference in New Issue
Block a user