scripts: west_commands: runners: Fix jlink is_ip
Commit f987e8c6f0a49b04a1184b1a36612612482e3d24 introduced a regression where the is_ip check fails if no --id is passed as an argument. Signed-off-by: Pieter De Gendt <pieter.degendt@basalte.be>
This commit is contained in:
parent
1689eaf6a4
commit
1759967597
1 changed files with 2 additions and 0 deletions
|
|
@ -30,6 +30,8 @@ DEFAULT_JLINK_GDB_PORT = 2331
|
|||
DEFAULT_JLINK_RTT_PORT = 19021
|
||||
|
||||
def is_ip(ip):
|
||||
if not ip:
|
||||
return False
|
||||
try:
|
||||
ipaddress.ip_address(ip.split(':')[0])
|
||||
except ValueError:
|
||||
|
|
|
|||
Loading…
Reference in a new issue