summaryrefslogtreecommitdiff
path: root/python
diff options
context:
space:
mode:
authorJohn Estabrook <jestabro@vyos.io>2023-09-05 13:46:54 -0500
committerJohn Estabrook <jestabro@vyos.io>2023-09-05 18:29:30 -0500
commit73e317bee57c03b719019daabd578842d912b761 (patch)
tree7b0e5e855a3dd5e52a5a06533254224fbf71f711 /python
parent490249bc57d948a60cd94f868d3bf0342caf136a (diff)
downloadvyos-1x-73e317bee57c03b719019daabd578842d912b761.tar.gz
vyos-1x-73e317bee57c03b719019daabd578842d912b761.zip
config-mgmt: T5353: only add log entry if archiving
Diffstat (limited to 'python')
-rw-r--r--python/vyos/config_mgmt.py7
1 files changed, 3 insertions, 4 deletions
diff --git a/python/vyos/config_mgmt.py b/python/vyos/config_mgmt.py
index 0fc72e660..996475eb8 100644
--- a/python/vyos/config_mgmt.py
+++ b/python/vyos/config_mgmt.py
@@ -200,9 +200,9 @@ Proceed ?'''
raise ConfigMgmtError(out)
entry = self._read_tmp_log_entry()
- self._add_log_entry(**entry)
if self._archive_active_config():
+ self._add_log_entry(**entry)
self._update_archive()
msg = 'Reboot timer stopped'
@@ -334,10 +334,10 @@ Proceed ?'''
user = self._get_user()
via = 'init'
comment = ''
- self._add_log_entry(user, via, comment)
# add empty init config before boot-config load for revision
# and diff consistency
if self._archive_active_config():
+ self._add_log_entry(user, via, comment)
self._update_archive()
os.umask(mask)
@@ -352,9 +352,8 @@ Proceed ?'''
self._new_log_entry(tmp_file=tmp_log_entry)
return
- self._add_log_entry()
-
if self._archive_active_config():
+ self._add_log_entry()
self._update_archive()
def commit_archive(self):