]> git.ipfire.org Git - thirdparty/systemd.git/commitdiff
test-network: drop unnecessary `global` 23714/head
authorFrantisek Sumsal <frantisek@sumsal.cz>
Sat, 11 Jun 2022 16:06:38 +0000 (18:06 +0200)
committerFrantisek Sumsal <frantisek@sumsal.cz>
Sat, 11 Jun 2022 16:06:38 +0000 (18:06 +0200)
`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).

test/test-network/systemd-networkd-tests.py

index 126a7426f4dff3182f71cfd4e4fc9963a50a9697..911f79f404130b4fbcd358eb6ef57c91152dcb65 100755 (executable)
@@ -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'))