summaryrefslogtreecommitdiffstats
path: root/lavalab-gen.py
diff options
context:
space:
mode:
Diffstat (limited to 'lavalab-gen.py')
-rwxr-xr-xlavalab-gen.py8
1 files changed, 4 insertions, 4 deletions
diff --git a/lavalab-gen.py b/lavalab-gen.py
index 2346689..c2c5347 100755
--- a/lavalab-gen.py
+++ b/lavalab-gen.py
@@ -94,7 +94,7 @@ def usage():
def main():
need_zmq_auth_gen = False
fp = open(boards_yaml, "r")
- workers = yaml.load(fp)
+ workers = yaml.safe_load(fp)
fp.close()
os.mkdir("output")
@@ -329,7 +329,7 @@ def main():
else:
#master exists
fp = open(dockcomposeymlpath, "r")
- dockcomp = yaml.load(fp)
+ dockcomp = yaml.safe_load(fp)
fp.close()
dockcomp["services"][name] = {}
dockcomp["services"][name]["hostname"] = name
@@ -524,7 +524,7 @@ def main():
workerdir = "output/%s/%s" % (host, worker_name)
dockcomposeymlpath = "output/%s/docker-compose.yml" % host
fp = open(dockcomposeymlpath, "r")
- dockcomp = yaml.load(fp)
+ dockcomp = yaml.safe_load(fp)
fp.close()
device_path = "%s/devices/" % workerdir
devices_path = "%s/devices/%s" % (workerdir, worker_name)
@@ -680,7 +680,7 @@ def main():
print("Add ser2net ports for %s (%s) %s-%s" % (slave_name, host, ser2net_port_start, ser2net_ports[slave_name]))
dockcomposeymlpath = "output/%s/docker-compose.yml" % host
fp = open(dockcomposeymlpath, "r")
- dockcomp = yaml.load(fp)
+ dockcomp = yaml.safe_load(fp)
fp.close()
ser2net_port_max = ser2net_ports[slave_name] - 1
dockcomp["services"][slave_name]["ports"].append("%s-%s:%s-%s" % (ser2net_port_start, ser2net_port_max, ser2net_port_start, ser2net_port_max))