end update thread to restart

This commit is contained in:
j 2016-01-13 10:53:12 +05:30
parent 44cb61da96
commit a723709641
1 changed files with 5 additions and 2 deletions

View File

@ -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()