Skip to content

Commit

Permalink
Fixes #92 - Correct package version comparission
Browse files Browse the repository at this point in the history
  • Loading branch information
sean797 committed Sep 10, 2017
1 parent b7e4d05 commit 3a95f9f
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
2 changes: 2 additions & 0 deletions tracer.spec
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,7 @@ Requires: rpm-python
Requires: python-beautifulsoup4
Requires: python-psutil
Requires: python-lxml
Requires: python-setuptools
Requires: %{name}-common = %{version}-%{release}
%if ! %{with suggest}
Suggests: python2-argcomplete
Expand All @@ -84,6 +85,7 @@ Requires: rpm-python3
Requires: python3-beautifulsoup4
Requires: python3-psutil
Requires: python3-lxml
Requires: python3-setuptools
Requires: python3-dbus
Requires: %{name}-common = %{version}-%{release}
%if %{with suggest}
Expand Down
4 changes: 2 additions & 2 deletions tracer/resources/tracer.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
from __future__ import absolute_import

import os
from distutils.version import LooseVersion
from pkg_resources import parse_version
from psutil import NoSuchProcess
from tracer.resources.system import System
from tracer.resources.FilenameCleaner import FilenameCleaner
Expand Down Expand Up @@ -131,7 +131,7 @@ def trace_affected(self, user=None):

def _has_updated_kernel(self):
for k_version in next(os.walk('/lib/modules/'))[1]:
if LooseVersion(os.uname()[2]) < LooseVersion(k_version):
if parse_version(os.uname()[2]) < parse_version(k_version):
return True
return False

Expand Down

0 comments on commit 3a95f9f

Please sign in to comment.