upgrades: Get result of start-dist-upgrade

Signed-off-by: James Valleroy <jvalleroy@mailbox.org>
Reviewed-by: Veiko Aasa <veiko17@disroot.org>
This commit is contained in:
James Valleroy authored and Veiko Aasa committed 2021-01-31 22:31:39 +02:00
1 parent 906816f7cb
commit d747f77f80
2 files changed
+14 -2

No files matched your search

+7 -1
View File
@@ -3,6 +3,7 @@
FreedomBox app for upgrades.
"""
import json
import logging
import os
import subprocess
@@ -178,7 +179,12 @@ def setup_repositories(data):
actions.superuser_run('upgrades', command)
if is_dist_upgrade_enabled():
actions.superuser_run('upgrades', ['start-dist-upgrade'])
output = actions.superuser_run('upgrades', ['start-dist-upgrade'])
result = json.loads(output)
dist_upgrade_started = result['dist_upgrade_started']
reason = result['reason']
logger.info('Result of start-dist-upgrade: %s, %s',
dist_upgrade_started, reason)
def is_backports_requested():