summaryrefslogtreecommitdiff
path: root/python/vyos
diff options
context:
space:
mode:
authorJohn Estabrook <jestabro@sentrium.io>2019-12-04 16:08:01 -0600
committerJohn Estabrook <jestabro@sentrium.io>2019-12-04 16:08:01 -0600
commita7083429020488390319e84dd003d80668154ae6 (patch)
tree03fade62c70efe221f1b0c32cca538c036628880 /python/vyos
parentaceb4d7e187a571019e4bc24cd23efc7c2f624fe (diff)
downloadvyos-1x-a7083429020488390319e84dd003d80668154ae6.tar.gz
vyos-1x-a7083429020488390319e84dd003d80668154ae6.zip
[vyos.config] T1847: correctly set_level for path given as empty string
Diffstat (limited to 'python/vyos')
-rw-r--r--python/vyos/config.py5
1 files changed, 4 insertions, 1 deletions
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: