backup: signal restore done before reboot

This commit is contained in:
Gina Häußge committed 2018-11-30 20:07:18 +01:00
1 parent f51a98768c
commit 38fce1665b
1 file changed
+6 -2
+6 -2
View File
@@ -881,6 +881,9 @@ class BackupPlugin(octoprint.plugin.SettingsPlugin,
if callable(on_log_progress):
on_log_progress(u"Restarting...")
if callable(on_restore_done):
on_restore_done(path)
try:
sarge.run(restart_command, async_=True)
except:
@@ -890,8 +893,9 @@ class BackupPlugin(octoprint.plugin.SettingsPlugin,
on_log_error(u"Please restart OctoPrint manually")
return False
if callable(on_restore_done):
on_restore_done(path)
else:
if callable(on_restore_done):
on_restore_done(path)
return True