Skip to content

Commit

Permalink
fix CPU info identification
Browse files Browse the repository at this point in the history
  • Loading branch information
mythmgn authored Jul 3, 2018
1 parent 3469f0a commit 4e85af1
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions cup/res/linux.py
Original file line number Diff line number Diff line change
Expand Up @@ -83,8 +83,8 @@ def get_kernel_version():
"""
versions = os.uname()[2]
version = versions[0: versions.find('_')]
return tuple([int(info) for info in version.split('.')])
# version = versions[0: versions.find('_')]
return tuple([info for info in version.split('.')])


@cup.decorators.needlinux
Expand Down Expand Up @@ -199,7 +199,7 @@ class MemInfo(collections.namedtuple('vmem', ' '.join([
_COLUMN_LOCK = threading.Lock()

_COLUMN_LOCK.acquire()
if get_kernel_version() >= (2, 6, 33) and _CPU_COLUMNS.count('guest_nice') <= 0:
if get_kernel_version() >= ('2', '6', '33') and _CPU_COLUMNS.count('guest_nice') <= 0:
_CPU_COLUMNS.append('guest_nice')
_COLUMN_LOCK.release()

Expand Down

0 comments on commit 4e85af1

Please sign in to comment.