From da0c08e79ac79b0730ddc7f816c09b407bdc15f2 Mon Sep 17 00:00:00 2001 From: Anton Hvornum Date: Fri, 14 Jan 2022 12:54:22 +0100 Subject: Added in version history in the configuration --- examples/guided.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'examples/guided.py') diff --git a/examples/guided.py b/examples/guided.py index 6f709b97..5ab87d9f 100644 --- a/examples/guided.py +++ b/examples/guided.py @@ -127,7 +127,11 @@ def save_user_configurations(): if archinstall.arguments.get('!encryption-password'): user_credentials["!encryption-password"] = archinstall.arguments['!encryption-password'] - user_configuration = json.dumps({**archinstall.arguments, 'version' : archinstall.__version__} , indent=4, sort_keys=True, cls=archinstall.JSON) + user_configuration = json.dumps({ + 'config_version': archinstall.__version__, # Tells us what version was used to generate the config + **archinstall.arguments, # __version__ will be overwritten by old version definition found in config + 'version': archinstall.__version__ + } , indent=4, sort_keys=True, cls=archinstall.JSON) with open("/var/log/archinstall/user_credentials.json", "w") as config_file: config_file.write(json.dumps(user_credentials, indent=4, sort_keys=True, cls=archinstall.UNSAFE_JSON)) -- cgit v1.2.3-70-g09d2