updates to allow emane to throw an exception when emane python bindings are not present and emane is attempted to be ran
This commit is contained in:
parent
71196004c8
commit
3165bddc92
2 changed files with 11 additions and 3 deletions
|
@ -39,6 +39,9 @@ except ImportError:
|
|||
from emanesh.events import LocationEvent
|
||||
from emanesh.events.eventserviceexception import EventServiceException
|
||||
except ImportError:
|
||||
EventService = None
|
||||
LocationEvent = None
|
||||
EventServiceException = None
|
||||
logging.debug("compatible emane python bindings not installed")
|
||||
|
||||
EMANE_MODELS = [
|
||||
|
@ -279,6 +282,10 @@ class EmaneManager(ModelManager):
|
|||
logging.debug("no emane nodes in session")
|
||||
return EmaneManager.NOT_NEEDED
|
||||
|
||||
# check if bindings were installed
|
||||
if EventService is None:
|
||||
raise CoreError("EMANE python bindings are not installed")
|
||||
|
||||
# control network bridge required for EMANE 0.9.2
|
||||
# - needs to exist when eventservice binds to it (initeventservice)
|
||||
otadev = self.get_config("otamanagerdevice")
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue