Skip to content

Commit

Permalink
Merge pull request #46 from supercoolin/database-escape-fix
Browse files Browse the repository at this point in the history
Database escape fix
  • Loading branch information
tbarbette authored Oct 16, 2023
2 parents e32f726 + ffef93b commit a08a0b9
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions npf/build.py
Original file line number Diff line number Diff line change
Expand Up @@ -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 = []
Expand Down Expand Up @@ -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()
Expand Down

0 comments on commit a08a0b9

Please sign in to comment.