Fixed compatibility with python-3.7
In python-3.7 async is a keyword, so it cannot be redefined. Signed-off-by: Jaroslav Škarvada <jskarvad@redhat.com>
This commit is contained in:
parent
443fd85cba
commit
f19b7c5713
2 changed files with 4 additions and 4 deletions
|
|
@ -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:
|
||||
|
|
|
|||
|
|
@ -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)
|
||||
|
|
|
|||
Loading…
Reference in a new issue