summaryrefslogtreecommitdiff
path: root/plugins/module_utils
diff options
context:
space:
mode:
authorDaniil Baturin <daniil@vyos.io>2026-09-28 12:18:50 +0100
committerGitHub <noreply@github.com>2026-09-28 12:18:50 +0100
commit98a1ee6719371d26b70a3208e6ede37cb158accb (patch)
treed7021560c5e302d7786190053678d6835aa4729a /plugins/module_utils
parent332a4fba3e9d0824f55c4fc5efd22091fee49c60 (diff)
parenta92fab433125c75e80bde7796db962be4d0a4c7f (diff)
downloadrest.vyos-T8989_ospv2_dict_op_refactor.tar.gz
rest.vyos-T8989_ospv2_dict_op_refactor.zip
Merge branch 'main' into T8989_ospv2_dict_op_refactorT8989_ospv2_dict_op_refactor
Diffstat (limited to 'plugins/module_utils')
-rw-r--r--plugins/module_utils/vyos.py6
1 files changed, 4 insertions, 2 deletions
diff --git a/plugins/module_utils/vyos.py b/plugins/module_utils/vyos.py
index f7c17f9..b7a519e 100644
--- a/plugins/module_utils/vyos.py
+++ b/plugins/module_utils/vyos.py
@@ -320,7 +320,8 @@ class VyOSModule:
that's actually already correct.
"""
result = self._client.retrieve_return_value(path)
- return result.get("data") or ""
+ data = result.get("data")
+ return "" if data is None else data
def apply_commands(self, commands):
if not commands:
@@ -372,7 +373,8 @@ class VyOSModule:
rather than being indistinguishable from a valid empty response.
"""
result = self._client.show(path)
- return result.get("data") or ""
+ data = result.get("data")
+ return "" if data is None else data
def save_config(self, file_path=None):
"""Save the running configuration to disk."""