From f40f386add31b5f9c621c3ef72633abc72fee711 Mon Sep 17 00:00:00 2001 From: abeudin Date: Thu, 13 Mar 2014 12:46:08 +0100 Subject: [PATCH] Update yunohost_tools.py --- yunohost_tools.py | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/yunohost_tools.py b/yunohost_tools.py index 0bf35932..b831f9d0 100644 --- a/yunohost_tools.py +++ b/yunohost_tools.py @@ -311,3 +311,16 @@ def tools_upgrade(): win_msg( _("Upgrade in progress")) else: raise YunoHostError(17, _("Launch update before upgrade")) + + +def tools_upgradelog(): + """ + Show upgrade log + + """ + if os.path.isfile('/tmp/yunohost/upgrade.run'): + win_msg( _("Upgrade in progress")) + else: + with open('/tmp/yunohost/update_log', 'r') as f: + read_data = f.read() + return { "DPKG LOG" : read_data.splitlines() }