From a723709641bd3a909d997af2d4cf1ffc869bc467 Mon Sep 17 00:00:00 2001 From: j Date: Wed, 13 Jan 2016 10:53:12 +0530 Subject: [PATCH] end update thread to restart --- oml/update.py | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/oml/update.py b/oml/update.py index 11a7f68..b2bc133 100644 --- a/oml/update.py +++ b/oml/update.py @@ -265,7 +265,8 @@ class Update(Thread): self.status('Installing new version...') if not install(False): self.status('Installation failed...') - restart_oml() + return True + return False def update_database(self): db_version = settings.server.get('db_version', 0) @@ -277,6 +278,8 @@ class Update(Thread): def run(self): self.status('Checking for Updates...') self.update_database() - self.install() + if self.install(): + restart_oml() + return self.status('Restarting...', True) restart_oml()