-
Bug
-
Resolution: Won't Do
-
Undefined
-
None
-
rhel-8.10
-
None
-
No
-
Moderate
-
rhel-pt-python
-
ssg_platform_tools
-
0
-
False
-
False
-
-
None
-
Red Hat Enterprise Linux
-
None
-
None
-
None
-
Unspecified
-
Unspecified
-
Unspecified
-
None
Comparing versions of kernel packages below fail with a traceback:
# /usr/libexec/platform-python3.6 [...] >>> from distutils.version import LooseVersion >>> a = LooseVersion("4.18.0-553.47.1.el8_10.x86_64") >>> a.version [4, 18, 0, '-', 553, 47, 1, 'el', 8, '_', 10, 'x', 86, '_', 64] >>> b = LooseVersion("4.18.0-553.el8_10.x86_64") >>> b.version [4, 18, 0, '-', 553, 'el', 8, '_', 10, 'x', 86, '_', 64] >>> a < b Traceback (most recent call last): File "<stdin>", line 1, in <module> File "/usr/lib64/python3.6/distutils/version.py", line 52, in __lt__ c = self._cmp(other) File "/usr/lib64/python3.6/distutils/version.py", line 337, in _cmp if self.version < other.version: TypeError: '<' not supported between instances of 'int' and 'str'
The root cause is item 5, which is a string in b ("el") versus an int in a ("47").
- is cloned by
-
RHEL-88529 distutils.version LooseVersion class breaks with kernel versioning
-
- Closed
-