summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorJoe Groocock <me@frebib.net>2023-05-14 11:42:21 +0000
committerJoe Groocock <me@frebib.net>2023-05-14 11:43:52 +0000
commit151f851502c8f7ec09d411a8a81452f7a7d64042 (patch)
tree541744fadaf13c7044cabb5046b6e7b4a0091c28 /src
parentaea89228d8c14ae0a11c5506a9c636200be97cfb (diff)
downloadvyos-1x-151f851502c8f7ec09d411a8a81452f7a7d64042.tar.gz
vyos-1x-151f851502c8f7ec09d411a8a81452f7a7d64042.zip
T5224: Fix `del system syslog`
os.unlink() is the correct function: Traceback (most recent call last): File "/usr/libexec/vyos/conf_mode/system-syslog.py", line 146, in <module> generate(c) File "/usr/libexec/vyos/conf_mode/system-syslog.py", line 114, in generate os.path.unlink(rsyslog_conf) ^^^^^^^^^^^^^^ AttributeError: module 'posixpath' has no attribute 'unlink' Signed-off-by: Joe Groocock <me@frebib.net>
Diffstat (limited to 'src')
-rwxr-xr-xsrc/conf_mode/system-syslog.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/conf_mode/system-syslog.py b/src/conf_mode/system-syslog.py
index e646fb0ae..4995ccb40 100755
--- a/src/conf_mode/system-syslog.py
+++ b/src/conf_mode/system-syslog.py
@@ -111,9 +111,9 @@ def verify(syslog):
def generate(syslog):
if not syslog:
if os.path.exists(rsyslog_conf):
- os.path.unlink(rsyslog_conf)
+ os.unlink(rsyslog_conf)
if os.path.exists(logrotate_conf):
- os.path.unlink(logrotate_conf)
+ os.unlink(logrotate_conf)
return None