Commit eef4c015 authored by BAIRE Anthony's avatar BAIRE Anthony
Browse files

allow working with an empty config file

parent 485de919
......@@ -1499,6 +1499,8 @@ class DockerController:
docker.utils.parse_bytes(txt)
except Exception as e:
raise ValueError("%s: %s" % (cfg.path(key), e))
if cfg is None:
cfg = config_reader.Mapping({})
self.cpu_shares = cfg.get("cpus", None, int)
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment