diff options
-rw-r--r-- | python/vyos/config.py | 5 | ||||
-rwxr-xr-x | src/conf_mode/system-syslog.py | 2 |
2 files changed, 4 insertions, 3 deletions
diff --git a/python/vyos/config.py b/python/vyos/config.py index c677d3118..441944338 100644 --- a/python/vyos/config.py +++ b/python/vyos/config.py @@ -107,7 +107,7 @@ class Config(object): # Session config ("active") only exists in conf mode. # In op mode, we'll just use the same running config for both active and session configs. if self.in_session(): - session_config_text = self._run([self._cli_shell_api, '--show-working-only', '--show-show-defaults', 'showConfig']) + session_config_text = self._run([self._cli_shell_api, '--show-working-only', '--show-show-defaults', '--show-ignore-edit', 'showConfig']) else: session_config_text = running_config_text @@ -194,7 +194,8 @@ 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) + if isinstance(path, str): + path = re.split(r'\s*', path) path_without_value = path[:-1] path_str = " ".join(path_without_value) try: diff --git a/src/conf_mode/system-syslog.py b/src/conf_mode/system-syslog.py index 4f0a54962..15533afab 100755 --- a/src/conf_mode/system-syslog.py +++ b/src/conf_mode/system-syslog.py @@ -186,6 +186,7 @@ def get_config(): # set system syslog host if c.exists('host'): rhosts = c.list_nodes('host') + proto = 'udp' for rhost in rhosts: for fac in c.list_nodes('host ' + rhost + ' facility'): if c.exists('host ' + rhost + ' facility ' + fac + ' protocol'): @@ -303,7 +304,6 @@ def verify(c): for s in c[conf][item]['selectors'].split(";"): f = re.sub("\..*$", "", s) if f not in fac: - print (c[conf]) raise ConfigError( 'Invalid facility ' + s + ' set in ' + conf + ' ' + item) l = re.sub("^.+\.", "", s) |