[machineid] simplify code

This commit is contained in:
Philip 2016-07-28 02:37:51 +02:00
parent ca9f4bc053
commit 8768c3af66

View File

@ -36,9 +36,8 @@ def run():
target_systemd_machineid_file = "{}/etc/machine-id".format(root_mount_point)
target_dbus_machineid_file = "{}/var/lib/dbus/machine-id".format(root_mount_point)
if enable_systemd or enable_dbus:
if os.path.exists(target_dbus_machineid_file):
os.remove(target_dbus_machineid_file)
if os.path.exists(target_dbus_machineid_file):
os.remove(target_dbus_machineid_file)
if enable_systemd:
if os.path.exists(target_systemd_machineid_file):