aboutsummaryrefslogtreecommitdiffstats
path: root/sos/report/plugins/apache.py
diff options
context:
space:
mode:
Diffstat (limited to 'sos/report/plugins/apache.py')
-rw-r--r--sos/report/plugins/apache.py12
1 files changed, 6 insertions, 6 deletions
diff --git a/sos/report/plugins/apache.py b/sos/report/plugins/apache.py
index 3088355b..f759ea98 100644
--- a/sos/report/plugins/apache.py
+++ b/sos/report/plugins/apache.py
@@ -61,7 +61,7 @@ class Apache(Plugin):
'pulp'
]
self.add_forbidden_path([
- "/var/log/%s*/%s*" % (self.apachepkg, sub) for sub in subdirs
+ f"/var/log/{self.apachepkg}*/{sub}*" for sub in subdirs
])
@@ -98,7 +98,7 @@ class RedHatApache(Apache, RedHatPlugin):
# Extrapolate all top-level config directories for each version, and
# relevant config files within each
- etcdirs = ["/etc/httpd%s" % ver for ver in vers]
+ etcdirs = [f"/etc/httpd{ver}" for ver in vers]
confs = [
"conf/*.conf",
"conf.d/*.conf",
@@ -107,7 +107,7 @@ class RedHatApache(Apache, RedHatPlugin):
# Extrapolate top-level logging directories for each version, and the
# relevant log files within each
- logdirs = ["/var/log/httpd%s" % ver for ver in vers]
+ logdirs = [f"/var/log/httpd{ver}" for ver in vers]
logs = [
"access_log",
"error_log",
@@ -116,19 +116,19 @@ class RedHatApache(Apache, RedHatPlugin):
]
self.add_forbidden_path([
- "%s/conf/password.conf" % etc for etc in etcdirs
+ f"{etc}/conf/password.conf" for etc in etcdirs
])
for edir in etcdirs:
for conf in confs:
- self.add_copy_spec("%s/%s" % (edir, conf), tags="httpd_conf")
+ self.add_copy_spec(f"{edir}/{conf}", tags="httpd_conf")
if self.get_option("log") or self.get_option("all_logs"):
self.add_copy_spec(logdirs)
else:
for ldir in logdirs:
for log in logs:
- self.add_copy_spec("%s/%s" % (ldir, log))
+ self.add_copy_spec(f"{ldir}/{log}")
self.add_service_status('httpd', tags='systemctl_httpd')