Merge "Fix CNI_COMMAND=VERSION case"
This commit is contained in:
commit
f3a675d40b
@ -40,7 +40,8 @@ def run():
|
||||
else:
|
||||
d = jsonutils.load(sys.stdin)
|
||||
cni_conf = utils.CNIConfig(d)
|
||||
args = ['--config-file', cni_conf.kuryr_conf]
|
||||
args = (['--config-file', cni_conf.kuryr_conf] if 'kuryr_conf' in d
|
||||
else [])
|
||||
|
||||
try:
|
||||
if cni_conf.debug:
|
||||
|
@ -329,6 +329,8 @@ logging.register_options(CONF)
|
||||
def init(args, **kwargs):
|
||||
version_k8s = version.version_info.version_string()
|
||||
CONF(args=args, project='kuryr-k8s', version=version_k8s, **kwargs)
|
||||
if os.environ.get('CNI_COMMAND') == 'VERSION':
|
||||
CONF.set_default('use_stderr', True)
|
||||
|
||||
|
||||
def setup_logging():
|
||||
|
Loading…
x
Reference in New Issue
Block a user