From 69986bb3e7baa8eef245d81e85cf03614102ebc2 Mon Sep 17 00:00:00 2001 From: Lars Wirzenius Date: Sat, 5 Nov 2022 09:43:01 +0200 Subject: refactor: use a named constant for name of file with user CA keys Sponsored-by: author --- cloud-init.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/cloud-init.py b/cloud-init.py index 814a5b7..52dd895 100644 --- a/cloud-init.py +++ b/cloud-init.py @@ -1,6 +1,8 @@ import os import yaml +USER_CA_KEYS = "user-ca-keys" + def log(msg): logfile.write(msg) @@ -58,7 +60,7 @@ for key_type in key_types: with open(filename, "w") as f: f.write(cert) -user_ca_filename = os.path.join(etc, "user-ca-keys") +user_ca_filename = os.path.join(etc, USER_CA_KEYS) if user_ca_pubkey: with open(user_ca_filename, "w") as f: f.write(user_ca_pubkey) -- cgit v1.2.1