mirror of
https://github.com/GNS3/gns3-server
synced 2024-11-18 22:38:07 +00:00
Do not crash at startup if local server as the same name as remote server
Fix #910
This commit is contained in:
parent
30db4d8b5c
commit
8aca3c7b99
@ -254,7 +254,7 @@ class Controller:
|
|||||||
return None
|
return None
|
||||||
|
|
||||||
for compute in self._computes.values():
|
for compute in self._computes.values():
|
||||||
if name and compute.name == name:
|
if name and compute.name == name and not force:
|
||||||
raise aiohttp.web.HTTPConflict(text='Compute name "{}" already exists'.format(name))
|
raise aiohttp.web.HTTPConflict(text='Compute name "{}" already exists'.format(name))
|
||||||
|
|
||||||
compute = Compute(compute_id=compute_id, controller=self, name=name, **kwargs)
|
compute = Compute(compute_id=compute_id, controller=self, name=name, **kwargs)
|
||||||
|
Loading…
Reference in New Issue
Block a user