mirror of
https://github.com/YunoHost/moulinette.git
synced 2024-09-03 20:06:31 +02:00
Update yunohost_tools.py
This commit is contained in:
parent
524489edaa
commit
6a9a8f082d
1 changed files with 13 additions and 10 deletions
|
@ -293,14 +293,17 @@ def tools_upgrade():
|
|||
Upgrade distribution
|
||||
|
||||
"""
|
||||
if os.path.isfile('/tmp/yunohost/update_status'):
|
||||
os.system('at now -f /etc/yunohost/upgrade')
|
||||
with open('/tmp/yunohost/upgrade_status', 'r') as f:
|
||||
read_data = f.read()
|
||||
os.system('rm /tmp/yunohost/upgrade_status')
|
||||
if read_data.strip() == "OK":
|
||||
win_msg( _("YunoHost has been successfully upgraded"))
|
||||
else:
|
||||
raise YunoHostError(17, _("Error during upgrade"))
|
||||
if os.path.isfile('/tmp/yunohost/upgrade.run'):
|
||||
win_msg( _("Upgrade in progress"))
|
||||
else:
|
||||
raise YunoHostError(17, _("Launch update before upgrade"))
|
||||
if os.path.isfile('/tmp/yunohost/update_status'):
|
||||
os.system('at now -f /etc/yunohost/upgrade')
|
||||
with open('/tmp/yunohost/upgrade_status', 'r') as f:
|
||||
read_data = f.read()
|
||||
os.system('rm /tmp/yunohost/upgrade_status')
|
||||
if read_data.strip() == "OK":
|
||||
win_msg( _("YunoHost has been successfully upgraded"))
|
||||
else:
|
||||
raise YunoHostError(17, _("Error during upgrade"))
|
||||
else:
|
||||
raise YunoHostError(17, _("Launch update before upgrade"))
|
||||
|
|
Loading…
Add table
Reference in a new issue