MCPcopy Index your code
hub / github.com/dpoulson/r2_control / stop_script

Method stop_script

Hardware/Scripts/ScriptControl.py:109–118  ·  view source on GitHub ↗
(self, kill_id)

Source from the content-addressed store, hash-verified

107 return message
108
109 def stop_script(self, kill_id):
110 idx = 0
111 if __debug__:
112 print(f"Trying to stop script ID {kill_id}")
113 for script in self.running_scripts:
114 if (int(script.script_id) == int(kill_id)) or (script.name == kill_id):
115 script.thread.stop()
116 self.running_scripts.pop(idx)
117 idx += 1
118 return "Ok"
119
120 def stop_all(self):
121 idx = 0

Callers 2

stop_allMethod · 0.95
_stop_scriptFunction · 0.80

Calls 1

stopMethod · 0.80

Tested by

no test coverage detected