summaryrefslogtreecommitdiff
path: root/python
diff options
context:
space:
mode:
Diffstat (limited to 'python')
-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: