summaryrefslogtreecommitdiffstats
path: root/bin/reproducible_json.py
diff options
context:
space:
mode:
Diffstat (limited to 'bin/reproducible_json.py')
-rwxr-xr-xbin/reproducible_json.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/bin/reproducible_json.py b/bin/reproducible_json.py
index cfb6e95b..6fb6549a 100755
--- a/bin/reproducible_json.py
+++ b/bin/reproducible_json.py
@@ -114,7 +114,7 @@ for data, fn, target in (
(output4tracker, open, REPRODUCIBLE_TRACKER_JSON),
(output4tracker, bz2.BZ2File, REPRODUCIBLE_TRACKER_JSON + '.bz2'),
):
- tmpfile = tempfile.mkstemp()[1]
+ tmpfile = tempfile.mkstemp(dir=os.path.dirname(target))[1]
with fn(tmpfile, 'w') as fd:
json.dump(data, fd, indent=4, sort_keys=True)
os.rename(tmpfile, target)