unify messages about files to be removed

This commit is contained in:
Martin Sehnoutka 2019-07-29 14:04:36 +02:00 committed by Tom Gundersen
parent 1ca4d8e6bb
commit 0cf93934eb
2 changed files with 4 additions and 2 deletions

View file

@ -14,8 +14,9 @@ def main(tree, options):
# the assumption is wrong, because it contains a default value from RPM package.
try:
os.remove(f"{tree}/etc/vconsole.conf")
print("/etc/vconsole.conf already exists. Replacing.")
except FileNotFoundError:
print("vconsole.conf does not exist")
pass
subprocess.run(["systemd-firstboot", f"--root={tree}", f"--keymap={keymap}"], check=True)

View file

@ -16,8 +16,9 @@ def main(tree, options):
try:
os.remove(f"{tree}/etc/localtime")
# ^ This will fail once systemd RPM package stops shipping the file
print("/etc/localtime already exists. Replacing.")
except FileNotFoundError:
print("systemd does not ship /etc/localtime anymore. Remove the workaround")
pass
subprocess.run(["systemd-firstboot", f"--root={tree}", f"--timezone={zone}"], check=True)