From 7e923d382352c7ae3da8728a4b62945a2e57a931 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Lubom=C3=ADr=20Sedl=C3=A1=C5=99?= Date: Thu, 15 Nov 2018 13:26:16 +0100 Subject: [PATCH] Remove timestamp from config dump MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit This makes it hard to programatically access the dump. The timestamp was included originally to make sure that restarting a compose in debug mode will preserve all configs. However we don't really support that usecase anyway. JIRA: COMPOSE-3063 Signed-off-by: Lubomír Sedlář --- bin/pungi-koji | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/bin/pungi-koji b/bin/pungi-koji index fcd1477e..205e9d14 100755 --- a/bin/pungi-koji +++ b/bin/pungi-koji @@ -4,7 +4,6 @@ from __future__ import print_function import argparse -import datetime import getpass import json import locale @@ -286,14 +285,14 @@ def run_compose(compose, create_latest_link=True, latest_link_status=None): compose.read_variants() # dump the config file - date_str = datetime.datetime.strftime(datetime.datetime.now(), "%F_%X").replace(":", "-") for config_file in compose.conf.opened_files: - config_dump = compose.paths.log.log_file("global", "config-copy_%s_%s" - % (os.path.basename(config_file), date_str)) + config_dump = compose.paths.log.log_file( + "global", "config-copy_%s" % os.path.basename(config_file) + ) with open(config_dump, "w") as dest: with open(config_file, 'r') as src: dest.write(src.read()) - config_dump_full = compose.paths.log.log_file("global", "config-dump_%s" % date_str) + config_dump_full = compose.paths.log.log_file("global", "config-dump") with open(config_dump_full, "w") as f: json.dump(compose.conf, f, sort_keys=True, indent=4)