From e18ce2f9d75d26ff3cca5961001ea4d98f57ef5d Mon Sep 17 00:00:00 2001 From: supercoolin Date: Tue, 19 Sep 2023 16:20:59 +0200 Subject: [PATCH 1/2] fix characters getting escaped at each database save --- npf/build.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/npf/build.py b/npf/build.py index bcc6ae3..a558d09 100755 --- a/npf/build.py +++ b/npf/build.py @@ -116,7 +116,7 @@ def _writeversion(self, filename, all_results, allow_overwrite): for key, val in sorted(run.variables.items()): if type(val) is tuple: val = val[1] - v.append((key + ":" + str(val).replace(':','\:')).replace(',','\,')) + v.append((key + ":" + str(val).replace('\:', ':').replace(':','\:')).replace('\,', ',').replace(',','\,')) type_results = [] for t,r in results.items(): str_results = [] From 2b696a00f2cc238a7dcbb7e74e228c35bc971ffd Mon Sep 17 00:00:00 2001 From: supercoolin Date: Wed, 20 Sep 2023 11:00:18 +0200 Subject: [PATCH 2/2] replace the results file each time --- npf/build.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/npf/build.py b/npf/build.py index a558d09..e8dff17 100755 --- a/npf/build.py +++ b/npf/build.py @@ -200,7 +200,8 @@ def writeResults(self): filename = self.__resultFilename() if not os.path.exists(os.path.dirname(filename)): os.makedirs(os.path.dirname(filename)) - open(filename, 'a').close() + + open(filename, 'w').close() def build_path(self): return self.repo.get_build_path()