From a7083429020488390319e84dd003d80668154ae6 Mon Sep 17 00:00:00 2001 From: John Estabrook Date: Wed, 4 Dec 2019 16:08:01 -0600 Subject: [vyos.config] T1847: correctly set_level for path given as empty string --- python/vyos/config.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/python/vyos/config.py b/python/vyos/config.py index 13b2c107e..c677d3118 100644 --- a/python/vyos/config.py +++ b/python/vyos/config.py @@ -160,7 +160,10 @@ class Config(object): # and path supplied as method argument # XXX: for small strings in-place concatenation is not a problem if isinstance(path, str): - self._level = re.split(r'\s*', path) + if path: + self._level = re.split(r'\s*', path) + else: + self._level = [] elif isinstance(path, list): self._level = path else: -- cgit v1.2.3