🐛 decode dpkg output to str, too
This commit is contained in:
parent
ae3bb2c362
commit
6b6e5bb798
1 changed files with 1 additions and 1 deletions
|
@ -117,7 +117,7 @@ def installed_kernel_versions_debian():
|
||||||
['dpkg-query',
|
['dpkg-query',
|
||||||
'--show', '--showformat', '${Package} ${Version}\n',
|
'--show', '--showformat', '${Package} ${Version}\n',
|
||||||
'linux-image*'])
|
'linux-image*'])
|
||||||
dpkg_out = dpkg_out.strip()
|
dpkg_out = dpkg_out.decode('ascii', 'ignore').strip()
|
||||||
|
|
||||||
versions = dpkg_out.split('\n')
|
versions = dpkg_out.split('\n')
|
||||||
versions = [v for v in versions if re.search('^linux-image-\d.* \S+$', v)]
|
versions = [v for v in versions if re.search('^linux-image-\d.* \S+$', v)]
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue