File s2kb_fixed_to_be_compatible_with_python3.patch of Package tuned.35791
From: Jaroslav Škarvada <jskarvad@redhat.com>
Subject: s2kb: fixed to be compatible with python3
References: Bugfix found by git HEAD review
Patch-Mainline: v2.11.0-rc.1
Git-commit: 18118c28149f073dd81d63b3cdf9e5f21e12e1e5
Git-repo: https://github.com/openSUSE/tuned.git
Resolves: rhbz#1684122
Signed-off-by: Jaroslav Škarvada <jskarvad@redhat.com>
Signed-off-by: Thomas Renninger <trenn@suse.com>
diff --git a/tuned/profiles/functions/function_s2kb.py b/tuned/profiles/functions/function_s2kb.py
index 27e3ad7..3d05bb4 100644
--- a/tuned/profiles/functions/function_s2kb.py
+++ b/tuned/profiles/functions/function_s2kb.py
@@ -15,6 +15,6 @@ class s2kb(base.Function):
if not super(s2kb, self).execute(args):
return None
try:
- return str(int(args[0]) / 2)
+ return str(int(round(int(args[0]) / 2)))
except ValueError:
return None