backups: Include app versions in manifest file

Signed-off-by: James Valleroy <jvalleroy@mailbox.org>
Reviewed-by: Joseph Nuthalapati <njoseph@thoughtworks.com>
This commit is contained in:
James Valleroy authored and Joseph Nuthalapati committed 2018-09-24 19:42:00 +05:30
1 parent 5c12403137
commit e815256b22
1 file changed
+5 -1
+5 -1
View File
@@ -77,7 +77,11 @@ def _backup_handler(packet):
os.makedirs(MANIFESTS_FOLDER)
manifest_path = MANIFESTS_FOLDER + packet.label + '.json'
manifests = {x[0]: x[2] for x in packet.manifests}
manifests = [{
'name': x[0],
'version': x[1].version,
'backup': x[2]
} for x in packet.manifests]
with open(manifest_path, 'w') as manifest_file:
json.dump(manifests, manifest_file)