summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDaniil Baturin <daniil@baturin.org>2019-10-27 16:38:55 +0100
committerDaniil Baturin <daniil@baturin.org>2019-10-27 16:38:55 +0100
commita5d800400aaf9d1df61feb79c3626d37d0a3015d (patch)
treedd9e42b42fc3d1e0347af75fd907db55ae677bc2
parentabecba2332d6b6756cf83ba2d87fcbf3640f0c18 (diff)
downloadvyos-1x-a5d800400aaf9d1df61feb79c3626d37d0a3015d.tar.gz
vyos-1x-a5d800400aaf9d1df61feb79c3626d37d0a3015d.zip
Allow list arguments in the vyos.config show_config() function.
-rw-r--r--python/vyos/config.py4
1 files changed, 3 insertions, 1 deletions
diff --git a/python/vyos/config.py b/python/vyos/config.py
index ee1adb289..5c2fc7285 100644
--- a/python/vyos/config.py
+++ b/python/vyos/config.py
@@ -222,7 +222,7 @@ class Config(object):
except VyOSError:
return False
- def show_config(self, path='', default=None):
+ def show_config(self, path=[], default=None):
"""
Args:
path (str): Configuration tree path, or empty
@@ -231,6 +231,8 @@ class Config(object):
Returns:
str: working configuration
"""
+ if isinstance(path, list):
+ path = " ".join(path)
try:
out = self._run(self._make_command('showConfig', path))
return out