Skip to content

Commit c3f8794

Browse files
committed
Add safe value for debug server when configuring debug speed
1 parent 695bee7 commit c3f8794

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

platform.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -184,7 +184,8 @@ def configure_debug_options(self, initial_debug_options, ide_data):
184184
debug_options = copy.deepcopy(initial_debug_options)
185185
adapter_speed = initial_debug_options.get("speed")
186186
if adapter_speed:
187-
server_executable = debug_options["server"].get("executable", "").lower()
187+
server_options = debug_options.get("server") or {}
188+
server_executable = server_options.get("executable", "").lower()
188189
if "openocd" in server_executable:
189190
debug_options["server"]["arguments"].extend(
190191
["-c", "adapter speed %s" % adapter_speed]

0 commit comments

Comments
 (0)