updates to fail early for required executables that are not in PATH
This commit is contained in:
parent
2a5c913a62
commit
503fa754a9
30 changed files with 128 additions and 132 deletions
|
@ -12,10 +12,11 @@ import logging
|
|||
import time
|
||||
from multiprocessing.pool import ThreadPool
|
||||
|
||||
from core import CoreCommandError, utils
|
||||
from core import utils
|
||||
from core.constants import which
|
||||
from core.emulator.data import FileData
|
||||
from core.emulator.enumerations import MessageFlags, RegisterTlvs
|
||||
from core.errors import CoreCommandError
|
||||
|
||||
|
||||
class ServiceBootError(Exception):
|
||||
|
@ -258,13 +259,7 @@ class ServiceManager(object):
|
|||
|
||||
# validate dependent executables are present
|
||||
for executable in service.executables:
|
||||
if not which(executable):
|
||||
logging.debug(
|
||||
"service(%s) missing executable: %s", service.name, executable
|
||||
)
|
||||
raise ValueError(
|
||||
"service(%s) missing executable: %s" % (service.name, executable)
|
||||
)
|
||||
which(executable, required=True)
|
||||
|
||||
# make service available
|
||||
cls.services[name] = service
|
||||
|
@ -300,7 +295,7 @@ class ServiceManager(object):
|
|||
cls.add(service)
|
||||
except ValueError as e:
|
||||
service_errors.append(service.name)
|
||||
logging.debug("not loading service: %s", e)
|
||||
logging.debug("not loading service(%s): %s", service.name, e)
|
||||
return service_errors
|
||||
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue