Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
Massimiliano Adamo
ubuntu-kernel-cleanup
Commits
e6b9c9a0
Unverified
Commit
e6b9c9a0
authored
Feb 02, 2021
by
Massimiliano Adamo
Browse files
fix package detection
parent
ad575508
Changes
1
Hide whitespace changes
Inline
Side-by-side
ubuntu-kernel-cleanup.py
View file @
e6b9c9a0
...
...
@@ -48,7 +48,7 @@ def get_packages_list(pkg_match):
installed_list
=
installed_out
.
decode
(
'utf-8'
).
split
(
'
\n
'
)
# delete empty items
kernels
=
[
item
for
item
in
installed_list
if
item
!=
''
]
kernel_versions
=
[
item
.
replace
(
pkg_match
,
''
)
for
item
in
kernels
]
kernel_versions
=
[
get_version
(
item
)
for
item
in
kernels
]
# sort by version and unique
return
sorted
(
list
(
set
(
kernel_versions
)),
key
=
LooseVersion
)
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment