Commit ac6fbdf0 authored by Cage, Gregory's avatar Cage, Gregory
Browse files

Raise exception if exit code is not 0 in container monitoring port parsing

parent e071effd
Loading
Loading
Loading
Loading
Loading
+2 −1
Original line number Diff line number Diff line
@@ -30,7 +30,8 @@ def parse_ports(container_name, connection_configuration):
                stdout_file.seek(0)
                ports_raw = stdout_file.read().decode("utf-8")
                return ports_raw

            else:
                raise Exception("Could not find port.")

def get_ip_command(cmd) -> str:
    return subprocess.check_output(shlex.split(cmd), text=True).strip()