fix arg order, indent
file path needs to be second.
also indent so we can read the doc
diff --git a/tools/archiver.py b/tools/archiver.py
index d4a82e0..85bdfd3 100755
--- a/tools/archiver.py
+++ b/tools/archiver.py
@@ -448,14 +448,14 @@
uid = uuid.uuid4()
mboxPath = os.path.join(dumpDir, "%s.json" % uid)
with open(mboxPath, "w") as f:
- json.dump(f, {
+ json.dump({
'mbox': ojson,
'mbox_source': {
"message-id": msg_metadata['message-id'],
"source": self.mbox_source(raw_msg)
},
'attachments': contents
- })
+ },f , indent = 2)
f.close()
sys.exit(0) # We're exiting here, the rest can't be done without ES