Skip to content

Commit 0da6990

Browse files
committed
Do nothing on removal of update process
Save broken state
1 parent 18c1a13 commit 0da6990

File tree

1 file changed

+9
-1
lines changed

1 file changed

+9
-1
lines changed

runusb

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -151,6 +151,14 @@ def kill_robot_process(path, process):
151151
pass
152152

153153

154+
def noop_close(path, process):
155+
"""
156+
We don't actually want to kill in the case of the update process.
157+
Could lead to the robot in a broken state!
158+
"""
159+
pass
160+
161+
154162
class AutorunProcessRegistry(object):
155163
TYPE_HANDLERS = {
156164
USBType.ROBOT: open_run_robot_code_process,
@@ -159,7 +167,7 @@ class AutorunProcessRegistry(object):
159167

160168
TYPE_CLOSE_HANDLER = {
161169
USBType.ROBOT: kill_robot_process,
162-
USBType.UPDATE: open_update_robot_process
170+
USBType.UPDATE: noop_close
163171
}
164172

165173
def __init__(self):

0 commit comments

Comments
 (0)