defined custom core command error that defaults to printing command output as well
This commit is contained in:
parent
29a3496eda
commit
974559843a
15 changed files with 90 additions and 81 deletions
|
@ -1,5 +1,4 @@
|
|||
import subprocess
|
||||
|
||||
from core import CoreCommandError
|
||||
from core import logger
|
||||
from core.misc import utils
|
||||
|
||||
|
@ -39,7 +38,7 @@ def emane_version():
|
|||
VERSION = EMANE093
|
||||
elif output.startswith("1.0.1"):
|
||||
VERSION = EMANE101
|
||||
except subprocess.CalledProcessError:
|
||||
except CoreCommandError:
|
||||
logger.exception("error checking emane version")
|
||||
output = ""
|
||||
|
||||
|
|
|
@ -3,10 +3,10 @@ emane.py: definition of an Emane class for implementing configuration control of
|
|||
"""
|
||||
|
||||
import os
|
||||
import subprocess
|
||||
import threading
|
||||
from xml.dom.minidom import parseString
|
||||
|
||||
from core import CoreCommandError
|
||||
from core import constants
|
||||
from core import emane
|
||||
from core import logger
|
||||
|
@ -949,7 +949,7 @@ class EmaneManager(ConfigurableManager):
|
|||
try:
|
||||
utils.check_cmd(args)
|
||||
utils.check_cmd(["killall", "-q", "emanetransportd"])
|
||||
except subprocess.CalledProcessError:
|
||||
except CoreCommandError:
|
||||
logger.exception("error shutting down emane daemons")
|
||||
|
||||
def installnetifs(self, do_netns=True):
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue