diff --git a/salt/manager/tools/sbin/so-yaml.py b/salt/manager/tools/sbin/so-yaml.py index 82a76a810..13ece5062 100755 --- a/salt/manager/tools/sbin/so-yaml.py +++ b/salt/manager/tools/sbin/so-yaml.py @@ -211,7 +211,7 @@ def replaceListObjectByCondition(content, key, conditionField, conditionValue, n if not found: print(f"No list item found with {conditionField}={conditionValue}. No action was taken on the file.", file=sys.stderr) return 1 - + except AttributeError: print("The existing value for the given key is not a list. No action was taken on the file.", file=sys.stderr) return 1