summaryrefslogtreecommitdiff
path: root/python
diff options
context:
space:
mode:
authorDaniil Baturin <daniil@baturin.org>2018-02-28 14:43:06 +0100
committerDaniil Baturin <daniil@baturin.org>2018-02-28 14:43:06 +0100
commit6ccbfde76e951652fdafa3bd602bc6c2e6f28c9d (patch)
treeec2938d34c89b6fac0184e4db332f3951dfffe32 /python
parentad4e0d54134a5767cc1f0e61136ded9422ef127a (diff)
downloadvyos-1x-6ccbfde76e951652fdafa3bd602bc6c2e6f28c9d.tar.gz
vyos-1x-6ccbfde76e951652fdafa3bd602bc6c2e6f28c9d.zip
Fix return_values function (return a list instead of a raw string).
Diffstat (limited to 'python')
-rw-r--r--python/vyos/config.py3
1 files changed, 2 insertions, 1 deletions
diff --git a/python/vyos/config.py b/python/vyos/config.py
index 6160d9a6b..6f544462c 100644
--- a/python/vyos/config.py
+++ b/python/vyos/config.py
@@ -117,7 +117,8 @@ class Config(object):
else:
try:
out = self._run(self._make_command('returnValues', full_path))
- return out
+ values = out.split()
+ return list(map(lambda x: re.sub(r'^\'(.*)\'$', r'\1',x), values))
except VyOSError:
return(default)