From 694a4e8068d885f801c1eee07b52eb7700e94494 Mon Sep 17 00:00:00 2001 From: Julien Duponchelle Date: Wed, 3 May 2017 17:55:13 +0200 Subject: [PATCH] Raise an error if we can't create the dynamips configuration directory Fix #992 --- gns3server/compute/dynamips/nodes/router.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/gns3server/compute/dynamips/nodes/router.py b/gns3server/compute/dynamips/nodes/router.py index b264ca64..1e45945a 100644 --- a/gns3server/compute/dynamips/nodes/router.py +++ b/gns3server/compute/dynamips/nodes/router.py @@ -71,7 +71,10 @@ class Router(BaseNode): super().__init__(name, node_id, project, manager, console=console, aux=aux, allocate_aux=aux) self._working_directory = os.path.join(self.project.module_working_directory(self.manager.module_name.lower()), self.id) - os.makedirs(os.path.join(self._working_directory, "configs"), exist_ok=True) + try: + os.makedirs(os.path.join(self._working_directory, "configs"), exist_ok=True) + except OSError as e: + raise DynamipsError("Can't create the dynamips config directory: {}".format(str(e))) if dynamips_id: self._convert_before_2_0_0_b3(dynamips_id)