Prevent some uncaught exceptions when systemtray is not enabled
This commit is contained in:
parent
1505b1704b
commit
85a41715b2
@ -154,6 +154,7 @@ class SystemTray(component.Component):
|
|||||||
self.__start()
|
self.__start()
|
||||||
|
|
||||||
def stop(self):
|
def stop(self):
|
||||||
|
if self.config["enable_system_tray"]:
|
||||||
try:
|
try:
|
||||||
# Hide widgets in hide list because we're not connected to a host
|
# Hide widgets in hide list because we're not connected to a host
|
||||||
for widget in self.hide_widget_list:
|
for widget in self.hide_widget_list:
|
||||||
@ -162,6 +163,7 @@ class SystemTray(component.Component):
|
|||||||
log.debug("Unable to hide system tray menu widgets: %s", e)
|
log.debug("Unable to hide system tray menu widgets: %s", e)
|
||||||
|
|
||||||
def shutdown(self):
|
def shutdown(self):
|
||||||
|
if self.config["enable_system_tray"]:
|
||||||
self.tray.set_visible(False)
|
self.tray.set_visible(False)
|
||||||
|
|
||||||
def send_status_request(self):
|
def send_status_request(self):
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user