Handle docker env with last empty line, Fixes: #2420

This commit is contained in:
ziajka
2018-02-27 16:33:55 +01:00
parent 7beae4e451
commit e79e27a73f
2 changed files with 32 additions and 30 deletions

View File

@ -314,7 +314,7 @@ class DockerVM(BaseNode):
params["Env"].append("GNS3_VOLUMES={}".format(":".join(self._volumes)))
if self._environment:
for e in self._environment.split("\n"):
for e in self._environment.strip().split("\n"):
e = e.strip()
if not e.startswith("GNS3_"):
params["Env"].append(e)