Browse Source

Merge "Check if config param exists before using it"

changes/97/698797/9
Zuul 5 months ago
committed by Gerrit Code Review
parent
commit
95aa963209
1 changed files with 4 additions and 3 deletions
  1. +4
    -3
      senlin/engine/actions/cluster_action.py

+ 4
- 3
senlin/engine/actions/cluster_action.py View File

@ -302,9 +302,10 @@ class ClusterAction(base.Action):
if config is not None:
# make sure config values are valid
try:
stop_timeout = config['cluster.stop_timeout_before_update']
config['cluster.stop_timeout_before_update'] = int(
stop_timeout)
stop_timeout = config.get('cluster.stop_timeout_before_update')
if stop_timeout:
config['cluster.stop_timeout_before_update'] = int(
stop_timeout)
except Exception as e:
return self.RES_ERROR, str(e)


Loading…
Cancel
Save