summaryrefslogtreecommitdiff
path: root/python/vyos/config.py
diff options
context:
space:
mode:
Diffstat (limited to 'python/vyos/config.py')
-rw-r--r--python/vyos/config.py6
1 files changed, 3 insertions, 3 deletions
diff --git a/python/vyos/config.py b/python/vyos/config.py
index e6a41a92d..e5963c19a 100644
--- a/python/vyos/config.py
+++ b/python/vyos/config.py
@@ -132,7 +132,7 @@ class Config(object):
# It may cause problems with exists() when it's used for checking values,
# since values may contain whitespace.
if isinstance(path, str):
- path = re.split(r'\s*', path)
+ path = re.split(r'\s+', path)
elif isinstance(path, list):
pass
else:
@@ -166,7 +166,7 @@ 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)
+ self._level = re.split(r'\s+', path)
elif isinstance(path, list):
self._level = path
else:
@@ -197,7 +197,7 @@ class Config(object):
else:
# libvyosconfig exists() works only for _nodes_, not _values_
# libvyattacfg one also worked for values, so we emulate that case here
- path = re.split(r'\s*', path)
+ path = re.split(r'\s+', path)
path_without_value = path[:-1]
path_str = " ".join(path_without_value)
try: