1
0
mirror of https://github.com/systemd/systemd.git synced 2024-10-27 10:25:37 +03:00

test-network: drop unnecessary global

`global` is needed only when assigning a new value to the global
variable; it's not necessary when modifying a mutable object (in our
case we just append items to the global list).
This commit is contained in:
Frantisek Sumsal 2022-06-11 18:06:38 +02:00
parent d45476ef5c
commit f4586b70b2

View File

@ -295,9 +295,6 @@ def expectedFailureIfFQPIEIsNotAvailable():
return f
def setUpModule():
# pylint: disable=global-statement
global running_units
os.makedirs(network_unit_file_path, exist_ok=True)
os.makedirs(networkd_conf_dropin_path, exist_ok=True)
os.makedirs(networkd_ci_path, exist_ok=True)
@ -405,9 +402,6 @@ def setUpModule():
check_output('systemctl restart systemd-udevd')
def tearDownModule():
# pylint: disable=global-statement
global running_units
shutil.rmtree(networkd_ci_path)
os.remove(os.path.join(udev_rules_dir, '00-debug-net.rules'))