diff options
author | John Estabrook <jestabro@vyos.io> | 2019-12-05 06:06:10 -0600 |
---|---|---|
committer | GitHub <noreply@github.com> | 2019-12-05 06:06:10 -0600 |
commit | fbc066cbf7c3614b6144f5447408727c4e0f0aa6 (patch) | |
tree | ed71724e6b03552289bc2625cafd49b97f139ec2 | |
parent | a93a1dbd7d18ff82246b4f7fb9a3757c14e6a9c7 (diff) | |
parent | a7083429020488390319e84dd003d80668154ae6 (diff) | |
download | vyos-1x-fbc066cbf7c3614b6144f5447408727c4e0f0aa6.tar.gz vyos-1x-fbc066cbf7c3614b6144f5447408727c4e0f0aa6.zip |
Merge pull request #175 from jestabro/T1847
[vyos.config] T1847: correctly set_level for path given as empty string
-rw-r--r-- | python/vyos/config.py | 5 |
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: |