Skip to content

Commit

Permalink
Remove deprecated root flag
Browse files Browse the repository at this point in the history
Allow some time for the GUI to load before releasing it
  • Loading branch information
NeonDaniel committed Dec 28, 2024
1 parent f02c28f commit 157d748
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions neon_phal_plugin_system/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
import subprocess
from os.path import dirname, join
from threading import Event
from time import sleep

from json_database import JsonStorageXDG, JsonDatabaseXDG
from ovos_bus_client.apis.gui import GUIInterface
Expand Down Expand Up @@ -295,11 +296,13 @@ def handle_mycroft_restart_request(self, message: Message):
self.bus.emit(message.forward("system.mycroft.service.restart.start", message.data))

try:
restart_service(service, sudo=self.use_root,
restart_service(service, sudo=False,
user=self.core_service_is_user)
except Exception as e:
LOG.error(f"Failed to restart service: {e}")
self.gui.clear() # Release the GUI
# Allow some time for the GUI display to start and release it
sleep(5)
self.gui.clear()

def handle_ssh_status(self, message: Message):
"""
Expand Down

0 comments on commit 157d748

Please sign in to comment.