diff options
author | AUTOMATIC <16777216c@gmail.com> | 2023-05-09 22:42:37 +0300 |
---|---|---|
committer | AUTOMATIC <16777216c@gmail.com> | 2023-05-09 22:42:37 +0300 |
commit | c8791c1d37502f162b8616b066303bfadc4a749b (patch) | |
tree | 6843c3505117f26549dfe1dc9cd40aacd5ccdfd3 /modules/ui_extensions.py | |
parent | 6fbd85dd0c0dffc06560bff91f4c4b65e441ca5f (diff) | |
parent | 31397986e70d20e392d9c3ec70d3aef8ecc2c1ff (diff) |
Merge branch 'dev' into release_candidate
Diffstat (limited to 'modules/ui_extensions.py')
-rw-r--r-- | modules/ui_extensions.py | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/modules/ui_extensions.py b/modules/ui_extensions.py index 99ac8756..d9faf85a 100644 --- a/modules/ui_extensions.py +++ b/modules/ui_extensions.py @@ -61,7 +61,8 @@ def save_config_state(name): if not name:
name = "Config"
current_config_state["name"] = name
- filename = os.path.join(config_states_dir, datetime.now().strftime("%Y_%m_%d-%H_%M_%S") + "_" + name + ".json")
+ timestamp = datetime.now().strftime('%Y_%m_%d-%H_%M_%S')
+ filename = os.path.join(config_states_dir, f"{timestamp}_{name}.json")
print(f"Saving backup of webui/extension state to {filename}.")
with open(filename, "w", encoding="utf-8") as f:
json.dump(current_config_state, f)
|