fix whitespaces in paths

This commit is contained in:
Matthias 2021-06-13 20:08:42 +02:00
parent 2e1db9d0bc
commit ec19d77523

View File

@ -282,7 +282,7 @@ def export_records(c, filename='data.json'):
tmpfile = f"{filename}.tmp" tmpfile = f"{filename}.tmp"
cmd = f"dumpdata --indent 2 --output {tmpfile} {content_excludes()}" cmd = f"dumpdata --indent 2 --output '{tmpfile}' {content_excludes()}"
# Dump data to temporary file # Dump data to temporary file
manage(c, cmd, pty=True) manage(c, cmd, pty=True)
@ -348,7 +348,7 @@ def import_records(c, filename='data.json'):
with open(tmpfile, "w") as f_out: with open(tmpfile, "w") as f_out:
f_out.write(json.dumps(data, indent=2)) f_out.write(json.dumps(data, indent=2))
cmd = f"loaddata {tmpfile} -i {content_excludes()}" cmd = f"loaddata '{tmpfile}' -i {content_excludes()}"
manage(c, cmd, pty=True) manage(c, cmd, pty=True)