summary refs log tree commit diff
path: root/nixos
diff options
context:
space:
mode:
authorDaniel Fullmer <danielrf12@gmail.com>2020-06-18 19:49:00 -0400
committerDaniel Fullmer <danielrf12@gmail.com>2020-06-18 19:58:50 -0400
commit1d4dc149dfabecfcf660d0c8bf4e40544849331b (patch)
tree1af1b78326dce2d29bf1734a4973e7489836160a /nixos
parent9480bae337095fd24f61380bce3174fdfe926a00 (diff)
nixos/systemd-boot: fix incorrect string formatting
Currently, this always writes "default nixos-generation-%d.conf" without
replacing the "%d" in the string.
Python .format() is not equivalent to "%"
Diffstat (limited to 'nixos')
-rw-r--r--nixos/modules/system/boot/loader/systemd-boot/systemd-boot-builder.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/nixos/modules/system/boot/loader/systemd-boot/systemd-boot-builder.py b/nixos/modules/system/boot/loader/systemd-boot/systemd-boot-builder.py
index d8baed65c6df3..97e824fe629ce 100644
--- a/nixos/modules/system/boot/loader/systemd-boot/systemd-boot-builder.py
+++ b/nixos/modules/system/boot/loader/systemd-boot/systemd-boot-builder.py
@@ -47,9 +47,9 @@ def write_loader_conf(profile, generation):
         if "@timeout@" != "":
             f.write("timeout @timeout@\n")
         if profile:
-            f.write("default nixos-%s-generation-%d.conf\n".format(profile, generation))
+            f.write("default nixos-%s-generation-%d.conf\n" % (profile, generation))
         else:
-            f.write("default nixos-generation-%d.conf\n".format(generation))
+            f.write("default nixos-generation-%d.conf\n" % (generation))
         if not @editor@:
             f.write("editor 0\n");
         f.write("console-mode @consoleMode@\n");