#998898 smem: doesn't parse smemcap output when using python3

Package:
smem
Source:
smem
Submitter:
André Draszik
Date:
2021-11-09 17:51:04 UTC
Severity:
important
Tags:
#998898#5
Date:
2021-11-09 17:49:05 UTC
From:
To:
smem throws an exception when injecting smemcap output into smem using the -S
argument:

Traceback (most recent call last):
  File "/usr/bin/smem", line 727, in <module>
    showpids()
  File "/usr/bin/smem", line 299, in showpids
    showtable(pt.keys(), fields, columns.split(), options.sort or 'pss')
  File "/usr/bin/smem", line 520, in showtable
    st = memory()['swaptotal']
  File "/usr/bin/smem", line 193, in memory
    m = f.match(l)
TypeError: cannot use a string pattern on a bytes-like object

python3's tarfile returns bytes, whereas all of the rest of
the code assumes str.