diff options
author | Bryn M. Reeves <bmr@redhat.com> | 2018-06-21 10:56:38 +0100 |
---|---|---|
committer | Bryn M. Reeves <bmr@redhat.com> | 2018-06-21 10:56:38 +0100 |
commit | bfd1631524d5987f5aa692b00190aa5db3c2645c (patch) | |
tree | d9307dac42b6c2b72251db71d8e381fec2da425e | |
parent | d198a3a5c7322b924013f03d6311c9cfbd204818 (diff) | |
download | sos-bfd1631524d5987f5aa692b00190aa5db3c2645c.tar.gz |
[rpm] do not double escape characters in raw string
When switching a Python string to a raw string escape sequences
like "\\n" must have the first `\` stripped or the literal value
will be taken when the string is used.
Signed-off-by: Bryn M. Reeves <bmr@redhat.com>
-rw-r--r-- | sos/plugins/rpm.py | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/sos/plugins/rpm.py b/sos/plugins/rpm.py index f26c4b11..c53b7e40 100644 --- a/sos/plugins/rpm.py +++ b/sos/plugins/rpm.py @@ -40,7 +40,7 @@ class Rpm(Plugin, RedHatPlugin): query_fmt = query_fmt + '%{INSTALLTIME:date}\n"' filter_cmd = 'awk -F "~~" ' \ - r'"{printf \\"%-59s %s\\n\\",\$1,\$2}"|sort -V' + r'"{printf \"%-59s %s\n\",\$1,\$2}"|sort -V' add_rpm_cmd(query_fmt, filter_cmd, "installed-rpms", None) |