Skip to content

Commit

Permalink
Update for compat. with ovos-gui including backwards-compat wrapper
Browse files Browse the repository at this point in the history
  • Loading branch information
NeonDaniel committed Sep 13, 2024
1 parent dbf6c37 commit ecd5c7f
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 3 deletions.
10 changes: 8 additions & 2 deletions neon_gui/service.py
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@
from time import sleep
from tornado import ioloop
from threading import Thread, Event
from ovos_utils.log import LOG
from ovos_utils.log import LOG, log_deprecation
from ovos_gui.service import GUIService

from neon_gui.utils import update_gui_ip_address
Expand Down Expand Up @@ -80,6 +80,12 @@ def __init__(self, ready_hook=on_ready, error_hook=on_error,
started_hook=started_hook, ready_hook=ready_hook,
error_hook=error_hook, stopping_hook=stopping_hook)

@property
def gui(self):
log_deprecation("`self.gui` has been replaced by "
"`self.namespace_manager`", "2.0.0")
return self.namespace_manager

def run(self):
self.status.set_started()
GUIService.run(self)
Expand All @@ -89,7 +95,7 @@ def run(self):
def shutdown(self):
LOG.info("GUI Service shutting down")
self.status.set_stopping()
self.gui.core_bus.close()
self.namespace_manager.core_bus.close()
self.bus.close()

loop = ioloop.IOLoop.instance()
Expand Down
2 changes: 1 addition & 1 deletion requirements/requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -5,4 +5,4 @@ click~=8.0
click-default-group~=1.2
tornado~=6.0
ovos-bus-client~=0.0,>=0.0.5
ovos-gui~=0.0,>=0.0.3
ovos-gui~=0.2

0 comments on commit ecd5c7f

Please sign in to comment.