From 153b8f6d049a2039ebf3a49285d8db839b5a636a Mon Sep 17 00:00:00 2001 From: Lucas Noki Date: Sat, 25 Jan 2020 01:02:59 +0100 Subject: [PATCH] Rename to meaningful variable name --- modules/swap/module.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/modules/swap/module.py b/modules/swap/module.py index 5a5f5b9..01a0d15 100644 --- a/modules/swap/module.py +++ b/modules/swap/module.py @@ -96,7 +96,7 @@ class SwapModule(AbstractModule): subprocess.call(get_swapiness, shell=True) def _adjust_swapiness_temp(self): - actions = { + options = { "Light": 25, "Default": 60, "Aggressive": 100 @@ -106,14 +106,14 @@ class SwapModule(AbstractModule): 'type': 'list', 'message': 'Select action', 'name': 'action', - 'choices': list(map(lambda x: {"name": x}, actions.keys())) + 'choices': list(map(lambda x: {"name": x}, options.keys())) } ] selected_swapiness = prompt(menu)['action'] - adjust = "sudo sysctl vm.swappiness=" + str(actions[selected_swapiness]) + adjust = "sudo sysctl vm.swappiness=" + str(options[selected_swapiness]) subprocess.call(adjust, shell=True) - print("Temporary swapiness is " + str(actions[selected_swapiness])) + print("Temporary swapiness is " + str(options[selected_swapiness])) def _delete_swap(self): location = self._swap_location_check()