From 5ad1f42beb6c606a78ffdcf8cba2b9c6aab32bc0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ond=C5=99ej=20Lyson=C4=9Bk?= Date: Tue, 22 May 2018 13:03:54 +0200 Subject: [PATCH] scheduler: Make instance._sched_cfg a local variable MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit It's not needed anywhere else. Signed-off-by: Ondřej Lysoněk --- tuned/plugins/plugin_scheduler.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/tuned/plugins/plugin_scheduler.py b/tuned/plugins/plugin_scheduler.py index 1b115f1..9ff7d7a 100644 --- a/tuned/plugins/plugin_scheduler.py +++ b/tuned/plugins/plugin_scheduler.py @@ -256,14 +256,14 @@ class SchedulerPlugin(base.Plugin): if ps is None: log.error("error applying tuning, cannot get information about running processes") return - instance._sched_cfg = [(option, str(value).split(":", 4)) for option, value in instance._scheduler.items()] - buf = [(option, vals) for option, vals in instance._sched_cfg if re.match(r"group\.", option) and len(vals) == 5] - instance._sched_cfg = sorted(buf, key=lambda option_vals: option_vals[1][0]) + sched_cfg = [(option, str(value).split(":", 4)) for option, value in instance._scheduler.items()] + buf = [(option, vals) for option, vals in sched_cfg if re.match(r"group\.", option) and len(vals) == 5] + sched_cfg = sorted(buf, key=lambda option_vals: option_vals[1][0]) sched_all = dict() # for runtime tunning instance._sched_lookup = {} for option, (rule_prio, scheduler, priority, affinity, regex) \ - in instance._sched_cfg: + in sched_cfg: try: r = re.compile(regex) except re.error as e: