From 524489edaa106bcb92e315e857ce7c073d344b51 Mon Sep 17 00:00:00 2001 From: abeudin Date: Thu, 13 Mar 2014 12:04:37 +0100 Subject: [PATCH] Update yunohost_tools.py --- yunohost_tools.py | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/yunohost_tools.py b/yunohost_tools.py index 7c8c9a19..e9a695ea 100644 --- a/yunohost_tools.py +++ b/yunohost_tools.py @@ -281,9 +281,12 @@ def tools_changelog(): Show Changelog """ - with open('/tmp/yunohost/changelog', 'r') as f: - read_data = f.read() - return { "Changelog" : read_data.splitlines() } + if os.path.isfile('/tmp/yunohost/update_status'): + with open('/tmp/yunohost/changelog', 'r') as f: + read_data = f.read() + return { "Changelog" : read_data.splitlines() } + else: + raise YunoHostError(17, _("Launch update before upgrade")) def tools_upgrade(): """