Fixed compatibility with python-3.7
Signed-off-by: Jaroslav Škarvada <jskarvad@redhat.com>
This commit is contained in:
parent
c4309b362f
commit
34637660f3
60
tuned-2.10.0-python-3.7-fix.patch
Normal file
60
tuned-2.10.0-python-3.7-fix.patch
Normal file
@ -0,0 +1,60 @@
|
||||
From f19b7c5713acb76a200811f6531acf2791505cac Mon Sep 17 00:00:00 2001
|
||||
From: =?UTF-8?q?Jaroslav=20=C5=A0karvada?= <jskarvad@redhat.com>
|
||||
Date: Wed, 4 Jul 2018 23:27:38 +0200
|
||||
Subject: [PATCH] Fixed compatibility with python-3.7
|
||||
MIME-Version: 1.0
|
||||
Content-Type: text/plain; charset=UTF-8
|
||||
Content-Transfer-Encoding: 8bit
|
||||
|
||||
In python-3.7 async is a keyword, so it cannot be redefined.
|
||||
|
||||
Signed-off-by: Jaroslav Škarvada <jskarvad@redhat.com>
|
||||
---
|
||||
tuned-adm.py | 4 ++--
|
||||
tuned/admin/admin.py | 4 ++--
|
||||
2 files changed, 4 insertions(+), 4 deletions(-)
|
||||
|
||||
diff --git a/tuned-adm.py b/tuned-adm.py
|
||||
index ea85c54..1b9623d 100755
|
||||
--- a/tuned-adm.py
|
||||
+++ b/tuned-adm.py
|
||||
@@ -98,7 +98,7 @@ if __name__ == "__main__":
|
||||
|
||||
options = vars(args)
|
||||
debug = options.pop("debug")
|
||||
- async = options.pop("async")
|
||||
+ asynco = options.pop("async")
|
||||
timeout = options.pop("timeout")
|
||||
action_name = options.pop("action")
|
||||
log_level = options.pop("loglevel")
|
||||
@@ -107,7 +107,7 @@ if __name__ == "__main__":
|
||||
dbus = config.get_bool(consts.CFG_DAEMON, consts.CFG_DEF_DAEMON)
|
||||
|
||||
try:
|
||||
- admin = tuned.admin.Admin(dbus, debug, async, timeout, log_level)
|
||||
+ admin = tuned.admin.Admin(dbus, debug, asynco, timeout, log_level)
|
||||
|
||||
result = admin.action(action_name, **options)
|
||||
except:
|
||||
diff --git a/tuned/admin/admin.py b/tuned/admin/admin.py
|
||||
index 728af32..3f84413 100644
|
||||
--- a/tuned/admin/admin.py
|
||||
+++ b/tuned/admin/admin.py
|
||||
@@ -14,12 +14,12 @@ import threading
|
||||
import logging
|
||||
|
||||
class Admin(object):
|
||||
- def __init__(self, dbus = True, debug = False, async = False,
|
||||
+ def __init__(self, dbus = True, debug = False, asynco = False,
|
||||
timeout = consts.ADMIN_TIMEOUT,
|
||||
log_level = logging.ERROR):
|
||||
self._dbus = dbus
|
||||
self._debug = debug
|
||||
- self._async = async
|
||||
+ self._async = asynco
|
||||
self._timeout = timeout
|
||||
self._cmd = commands(debug)
|
||||
self._profiles_locator = profiles_locator(consts.LOAD_DIRECTORIES)
|
||||
--
|
||||
2.14.4
|
||||
|
@ -55,6 +55,7 @@ Requires: util-linux, dbus, polkit
|
||||
%if 0%{?fedora} > 22 || 0%{?rhel} > 7
|
||||
Recommends: kernel-tools
|
||||
%endif
|
||||
Patch0: tuned-2.10.0-python-3.7-fix.patch
|
||||
|
||||
%description
|
||||
The tuned package contains a daemon that tunes system settings dynamically.
|
||||
@ -199,6 +200,7 @@ It can be also used to fine tune your system for specific scenarios.
|
||||
|
||||
%prep
|
||||
%setup -q -n %{name}-%{version}%{?prerel2}
|
||||
%patch0 -p1
|
||||
|
||||
%build
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user