diff options
author | Pavel Moravec <pmoravec@redhat.com> | 2020-05-22 08:17:30 +0200 |
---|---|---|
committer | Jake Hunsaker <jhunsake@redhat.com> | 2020-05-26 09:42:46 -0400 |
commit | c2d4c7d1f3ecf6ac59c665cb5138cb2ddda71b3d (patch) | |
tree | 2e4da9fe5d2781556c19384ae7c9733d59c2d772 | |
parent | af5597bfa41521e10f4ef5095f137b2ef5bcd661 (diff) | |
download | sos-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.py | 2 |
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: |