1
0
mirror of https://github.com/GNS3/gns3-server synced 2024-11-13 20:08:55 +00:00

Fix crash when you start twice the same container

This commit is contained in:
Julien Duponchelle 2016-03-24 18:35:15 +01:00
parent e6ddce86b3
commit 2e455037e1
No known key found for this signature in database
GPG Key ID: F1E2485547D4595D

View File

@ -179,8 +179,8 @@ class DockerVM(BaseVM):
"""
path = os.path.join(self.working_dir, "etc", "network")
os.makedirs(path, exist_ok=True)
os.makedirs(os.path.join(path, "if-up.d"))
os.makedirs(os.path.join(path, "if-down.d"))
os.makedirs(os.path.join(path, "if-up.d"), exist_ok=True)
os.makedirs(os.path.join(path, "if-down.d"), exist_ok=True)
if not os.path.exists(os.path.join(path, "interfaces")):
with open(os.path.join(path, "interfaces"), "w+") as f: