summaryrefslogtreecommitdiff
path: root/python
diff options
context:
space:
mode:
Diffstat (limited to 'python')
-rw-r--r--python/vyos/opmode.py3
1 files changed, 3 insertions, 0 deletions
diff --git a/python/vyos/opmode.py b/python/vyos/opmode.py
index c48866ed8..af2c7b28b 100644
--- a/python/vyos/opmode.py
+++ b/python/vyos/opmode.py
@@ -228,6 +228,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