mirror of
https://github.com/GNS3/gns3-server.git
synced 2024-12-20 05:17:56 +00:00
Raise an error if we can't create the dynamips configuration directory
Fix #992
This commit is contained in:
parent
7ba351c888
commit
694a4e8068
@ -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)
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user