Commit 4f8c82f6 authored by Andrii Salnikov's avatar Andrii Salnikov

Aviod config validate crash on invocations without installed a-rex

parent c288424a
......@@ -2,6 +2,7 @@ from __future__ import absolute_import
from .ControlCommon import *
from arc.utils import reference
import os
import sys
import subprocess
......@@ -107,7 +108,12 @@ class ConfigControl(ComponentControl):
sys.stdout.write(line)
def verify(self, args):
validator_cmd = [ARC_LIBEXEC_DIR + '/arc-config-check']
validator_script = ARC_LIBEXEC_DIR + '/arc-config-check'
if not os.path.exists(validator_script):
self.logger.error('The configuration check script is missing at %s. '
'Note that config validation is currently targeting A-REX only.', validator_script)
return 1
validator_cmd = [validator_script]
if args.config:
validator_cmd += ['--config', args.config]
if args.verbosity:
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment