From 2317e2865487f7d44685feced691be73f4bad613 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ond=C5=99ej=20Lyson=C4=9Bk?= Date: Tue, 12 Mar 2019 12:48:33 +0100 Subject: [PATCH] net: Rename local variables MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Rename local variables to make the code more readable. Signed-off-by: Ondřej Lysoněk --- tuned/plugins/plugin_net.py | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) diff --git a/tuned/plugins/plugin_net.py b/tuned/plugins/plugin_net.py index 3010c3c..e0a0447 100644 --- a/tuned/plugins/plugin_net.py +++ b/tuned/plugins/plugin_net.py @@ -376,15 +376,18 @@ class NetTuningPlugin(base.Plugin): command_name = context, device_name = device) if start: - cd = self._get_device_parameters(context, device) - d = self._set_device_parameters(context, value, device, verify, - dev_params = cd) + params_current = self._get_device_parameters(context, + device) + params_set = self._set_device_parameters(context, + value, device, verify, + dev_params = params_current) # if none of parameters passed checks then the command completely # failed - if len(d) == 0: + if len(params_set) == 0: return False # saved are only those parameters which passed checks - self._storage.set(storage_key," ".join(self._cmd.dict2list(d))) + self._storage.set(storage_key, " ".join( + self._cmd.dict2list(params_set))) else: original_value = self._storage.get(storage_key) # in storage are only those parameters which were already tested