From e55798494b58047642dc3d7449f0d21ad7ffac1d Mon Sep 17 00:00:00 2001 From: forest Date: Mon, 15 Feb 2021 21:10:57 -0600 Subject: [PATCH] pig snorting sounds --- capsulflask/spoke_model.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/capsulflask/spoke_model.py b/capsulflask/spoke_model.py index 785e8de..ae437c0 100644 --- a/capsulflask/spoke_model.py +++ b/capsulflask/spoke_model.py @@ -83,9 +83,10 @@ class ShellScriptSpoke(VirtualizationInterface): completedProcess = run([join(current_app.root_path, 'shell_scripts/get.sh'), id], capture_output=True) self.validate_completed_process(completedProcess) lines = completedProcess.stdout.splitlines() - ipaddr = lines[0].decode("utf-8") if len(lines) == 0: return None + + ipaddr = lines[0].decode("utf-8") if not re.match(r"^([0-9]{1,3}\.){3}[0-9]{1,3}$", ipaddr): return None