Skip to content

Commit 829c03b

Browse files
ngphibangdleach02
authored andcommitted
runners: jlink: Fix NoneType object error
The commit 221199e presents a bug that makes west flash failed with error. AttributeError: 'NoneType' object has no attribute 'startswith' In function is_tunnel(), tunnel may contain None and has no attribute "startswith". Fix it. Signed-off-by: Phi Bang Nguyen <phibang.nguyen@nxp.com>
1 parent 18fb3f9 commit 829c03b

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

scripts/west_commands/runners/jlink.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ def is_ip(ip):
3737
return True
3838

3939
def is_tunnel(tunnel):
40-
return tunnel.startswith("tunnel:")
40+
return tunnel.startswith("tunnel:") if tunnel else False
4141

4242
class ToggleAction(argparse.Action):
4343

0 commit comments

Comments
 (0)