fixed exception catches for get_node expecting KeyError to expect CoreError
This commit is contained in:
parent
0db3031b15
commit
32bfa4b2f9
8 changed files with 23 additions and 26 deletions
|
@ -7,7 +7,7 @@ import logging
|
|||
import os
|
||||
import threading
|
||||
|
||||
from core import CoreCommandError, constants, utils
|
||||
from core import CoreCommandError, CoreError, constants, utils
|
||||
from core.api.tlv import coreapi, dataconversion
|
||||
from core.config import ConfigGroup, ConfigShim, Configuration, ModelManager
|
||||
from core.emane import emanemanifest
|
||||
|
@ -950,7 +950,7 @@ class EmaneManager(ModelManager):
|
|||
# generate a node message for this location update
|
||||
try:
|
||||
node = self.session.get_node(n)
|
||||
except KeyError:
|
||||
except CoreError:
|
||||
logging.exception(
|
||||
"location event NEM %s has no corresponding node %s" % (nemid, n)
|
||||
)
|
||||
|
|
|
@ -4,6 +4,7 @@ Defines Emane Models used within CORE.
|
|||
import logging
|
||||
import os
|
||||
|
||||
from core import CoreError
|
||||
from core.config import ConfigGroup, Configuration
|
||||
from core.emane import emanemanifest
|
||||
from core.emulator.enumerations import ConfigDataTypes
|
||||
|
@ -142,7 +143,7 @@ class EmaneModel(WirelessModel):
|
|||
try:
|
||||
wlan = self.session.get_node(self.id)
|
||||
wlan.setnempositions(moved_netifs)
|
||||
except KeyError:
|
||||
except CoreError:
|
||||
logging.exception("error during update")
|
||||
|
||||
def linkconfig(
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue