diff --git a/compose_viz/parser.py b/compose_viz/parser.py index 649e437..0b327e6 100644 --- a/compose_viz/parser.py +++ b/compose_viz/parser.py @@ -59,7 +59,7 @@ class Parser: if service.get("ports"): if type(service["ports"]) is list: for port_data in service["ports"]: - if not port_data.contains(":"): + if ':' not in port_data: raise RuntimeError("Invalid ports input, aborting.") spilt_data = port_data.split(":", 1) service_ports.append(Port(host_port=spilt_data[0],