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 2018-08-25 21:47:45 -04:00 committed by Joseph Nuthalapati
parent 5c12403137
commit e815256b22
No known key found for this signature in database
GPG Key ID: 5398F00A2FA43C35

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)