aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPavel Moravec <pmoravec@redhat.com>2020-05-22 08:17:30 +0200
committerJake Hunsaker <jhunsake@redhat.com>2020-05-26 09:42:46 -0400
commitc2d4c7d1f3ecf6ac59c665cb5138cb2ddda71b3d (patch)
tree2e4da9fe5d2781556c19384ae7c9733d59c2d772
parentaf5597bfa41521e10f4ef5095f137b2ef5bcd661 (diff)
downloadsos-c2d4c7d1f3ecf6ac59c665cb5138cb2ddda71b3d.tar.gz
[containers_common] fix user's home expansion
Apply os.path.expanduser on ~[user], not ~%s . Relates to: #2082 Signed-off-by: Pavel Moravec <pmoravec@redhat.com> Signed-off-by: Jake Hunsaker <jhunsake@redhat.com>
-rw-r--r--sos/report/plugins/containers_common.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/sos/report/plugins/containers_common.py b/sos/report/plugins/containers_common.py
index 9a878849..da360c7e 100644
--- a/sos/report/plugins/containers_common.py
+++ b/sos/report/plugins/containers_common.py
@@ -45,7 +45,7 @@ class ContainersCommon(Plugin, RedHatPlugin, UbuntuPlugin):
for user in users_list:
# collect user's containers' config
self.add_copy_spec(
- '%s/.config/containers/' % (os.path.expanduser('~%s') % user))
+ '%s/.config/containers/' % (os.path.expanduser('~%s' % user)))
# collect the user's podman/buildah info and uid/guid maps
for binary in ['/usr/bin/podman', '/usr/bin/buildah']:
for cmd in user_subcmds: