From b5705adbb468c3849bd096d2d937c79c2d15ebc0 Mon Sep 17 00:00:00 2001 From: Jerome Petazzoni Date: Mon, 8 Jun 2015 11:06:36 -0700 Subject: [PATCH] wip --- split-services-and-network.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/split-services-and-network.py b/split-services-and-network.py index 35f37c08..e9d7c3a6 100755 --- a/split-services-and-network.py +++ b/split-services-and-network.py @@ -1,10 +1,11 @@ #!/usr/bin/env python +import sys import yaml input_file, output_file = sys.argv[1:3] -stack = yaml.load(input_file) +stack = yaml.load(open(input_file)) # The ambassadors need to know the service port to use. # Those ports must be declared here. @@ -18,7 +19,7 @@ ports = dict( links = {} # First, collect all links. -for service_name, service in stack.itemize(): +for service_name, service in stack.items(): if "links" in service: for link in service["links"]: if link not in ports: