Commit 829c03bc authored by Phi Bang Nguyen's avatar Phi Bang Nguyen Committed by David Leach
Browse files

runners: jlink: Fix NoneType object error

The commit 221199e1 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: default avatarPhi Bang Nguyen <phibang.nguyen@nxp.com>
parent 18fb3f9a
Loading
Loading
Loading
Loading
+1 −1
Changes for scripts/west_commands/runners/jlink.py: 1 added line, 1 removed line.
Original line number Diff line number Diff line
@@ -37,7 +37,7 @@ def is_ip(ip):
    return True

def is_tunnel(tunnel):
    return tunnel.startswith("tunnel:")
    return tunnel.startswith("tunnel:") if tunnel else False

class ToggleAction(argparse.Action):