mirror of
https://github.com/GNS3/gns3-server.git
synced 2026-11-03 22:11:14 +02:00
Catch exceptions in various locations to fix small issues reported by Sentry.
This commit is contained in:
1 parent
341e2e2e3a
commit
4021a13651
8 files changed
+63
-40
No files matched your search
@@ -69,7 +69,7 @@ class Controller:
|
||||
for directory, builtin in (
|
||||
(get_resource('appliances'), True,), (self.appliances_path(), False,)
|
||||
):
|
||||
if os.path.isdir(directory):
|
||||
if directory and os.path.isdir(directory):
|
||||
for file in os.listdir(directory):
|
||||
if not file.endswith('.gns3a') and not file.endswith('.gns3appliance'):
|
||||
continue
|
||||
@@ -509,7 +509,7 @@ class Controller:
|
||||
return self._computes[compute_id]
|
||||
except KeyError:
|
||||
if compute_id == "vm":
|
||||
raise aiohttp.web.HTTPNotFound(text="You try to use a node on the GNS3 VM server but the GNS3 VM is not configured")
|
||||
raise aiohttp.web.HTTPNotFound(text="A node is set to use the GNS3 VM server but the GNS3 VM is not configured")
|
||||
raise aiohttp.web.HTTPNotFound(text="Compute ID {} doesn't exist".format(compute_id))
|
||||
|
||||
def has_compute(self, compute_id):
|
||||
|
||||
Reference in new issue
Block a user