Skip to content

Commit c888d11

Browse files
committed
make sure self.steps is callable
1 parent f0e4298 commit c888d11

File tree

1 file changed

+1
-1
lines changed
  • server_python_scripts/blocks_base_classes

1 file changed

+1
-1
lines changed

server_python_scripts/blocks_base_classes/opmode.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ def start(self) -> None:
88
self.robot.start()
99
def loop(self) -> None:
1010
# Call steps method if it exists in the derived class
11-
if hasattr(self, 'steps'):
11+
if hasattr(self, 'steps') and callable(self.steps):
1212
self.steps()
1313
self.robot.update()
1414
def stop(self) -> None:

0 commit comments

Comments
 (0)