`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).
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)
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'))