Skip to content
Snippets Groups Projects
Commit 209430b3 authored by Jan David Mol's avatar Jan David Mol
Browse files

L2SS-295: Log when someone requests a state we're already in, as that could be a bug.

parent a4db4c9e
No related branches found
No related tags found
1 merge request!72L2SS-295: Make some things more dev/user friendly
...@@ -102,6 +102,7 @@ class hardware_device(Device): ...@@ -102,6 +102,7 @@ class hardware_device(Device):
""" """
if self.get_state() == DevState.ON: if self.get_state() == DevState.ON:
# Already on. Don't complain. # Already on. Don't complain.
logger.warning("Requested to go to ON state, but am already in ON state.")
return return
self.configure_for_on() self.configure_for_on()
...@@ -144,6 +145,7 @@ class hardware_device(Device): ...@@ -144,6 +145,7 @@ class hardware_device(Device):
""" """
if self.get_state() == DevState.FAULT: if self.get_state() == DevState.FAULT:
# Already faulting. Don't complain. # Already faulting. Don't complain.
logger.warning("Requested to go to FAULT state, but am already in FAULT state.")
return return
self.configure_for_fault() self.configure_for_fault()
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment