fix merge missing "fix index out of range when parsing output from
shell_scripts/get.sh"
This commit is contained in:
parent
2bc5b10284
commit
f75575313b
@ -84,6 +84,8 @@ class ShellScriptSpoke(VirtualizationInterface):
|
|||||||
self.validate_completed_process(completedProcess)
|
self.validate_completed_process(completedProcess)
|
||||||
lines = completedProcess.stdout.splitlines()
|
lines = completedProcess.stdout.splitlines()
|
||||||
ipaddr = lines[0].decode("utf-8")
|
ipaddr = lines[0].decode("utf-8")
|
||||||
|
if len(lines) == 0:
|
||||||
|
return None
|
||||||
|
|
||||||
if not re.match(r"^([0-9]{1,3}\.){3}[0-9]{1,3}$", ipaddr):
|
if not re.match(r"^([0-9]{1,3}\.){3}[0-9]{1,3}$", ipaddr):
|
||||||
return None
|
return None
|
||||||
|
Loading…
Reference in New Issue
Block a user