From a5d800400aaf9d1df61feb79c3626d37d0a3015d Mon Sep 17 00:00:00 2001 From: Daniil Baturin Date: Sun, 27 Oct 2019 16:38:55 +0100 Subject: Allow list arguments in the vyos.config show_config() function. --- python/vyos/config.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'python') 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 -- cgit v1.2.3