Skip to content

Commit 5a82d67

Browse files
committed
Improve the old kernel version detect, now the 3.8 kernel under 3.11 will be cleaned
1 parent f11180b commit 5a82d67

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

ubuntutweak/janitor/oldkernel_plugin.py

+2-1
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22
import re
33
import logging
44

5+
from distutils.version import LooseVersion
56
from ubuntutweak.gui.gtk import set_busy, unset_busy
67
from ubuntutweak.janitor import JanitorPlugin, PackageObject
78
from ubuntutweak.utils.package import AptWorker
@@ -95,7 +96,7 @@ def _compare_kernel_version(self, version):
9596
else:
9697
return False
9798
else:
98-
return c1 > p1
99+
return LooseVersion(c1) > LooseVersion(p1)
99100

100101
def get_summary(self, count):
101102
if count:

0 commit comments

Comments
 (0)