Skip to content
Snippets Groups Projects
Commit eb649db9 authored by Stéphane Diemer's avatar Stéphane Diemer
Browse files

Fixed Debian kernel cleaning

parent 0703dbf5
No related branches found
No related tags found
No related merge requests found
......@@ -63,7 +63,9 @@ def clean_kernels():
try:
current_str = out.split(' ')[2]
if current_str.endswith('-generic'):
current_str = current_str[:-8]
current_str = current_str[:-len('-generic')]
elif current_str.endswith('-amd64'):
current_str = current_str[:-len('-amd64')]
current = [int(v) for v in current_str.replace('-', '.').split('.')]
except Exception as e:
log(RED + 'Failed to get current kernel.' + DEFAULT + '\nError: ' + str(e), error=True)
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment