Prevent capture on non running node

Fix https://github.com/GNS3/gns3-gui/issues/1656
This commit is contained in:
Julien Duponchelle committed 2016-11-22 16:05:57 +01:00
1 parent 31c04cc95b
commit 875051d05e
9 files changed
+158 -39

No files matched your search

+3 -1
View File
@@ -17,6 +17,7 @@
import os
import aiohttp
import asyncio
from contextlib import contextmanager
from ..notification_queue import NotificationQueue
@@ -51,6 +52,7 @@ class Notification:
"""
return project.id in self._listeners and len(self._listeners[project.id]) > 0
@asyncio.coroutine
def dispatch(self, action, event, compute_id):
"""
Notification received from compute node. Send it directly
@@ -65,7 +67,7 @@ class Notification:
# Update controller node data and send the event node.updated
project = self._controller.get_project(event["project_id"])
node = project.get_node(event["node_id"])
node.parse_node_response(event)
yield from node.parse_node_response(event)
self.emit("node.updated", node.__json__())
except aiohttp.web.HTTPNotFound: