diff options
Diffstat (limited to 'python/vyos')
-rw-r--r-- | python/vyos/opmode.py | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/python/vyos/opmode.py b/python/vyos/opmode.py index 30e893d74..3f1053b40 100644 --- a/python/vyos/opmode.py +++ b/python/vyos/opmode.py @@ -217,6 +217,9 @@ def run(module): if not args["raw"]: return res else: + if not isinstance(res, dict) and not isinstance(res, list): + raise InternalError(f"Bare literal is not an acceptable raw output, must be a list or an object.\ + The output was:{res}") res = decamelize(res) res = _normalize_field_names(res) from json import dumps |