Rename to meaningful variable name

This commit is contained in:
Lucas Noki 2020-01-25 01:02:59 +01:00
parent d2c729f0ab
commit 153b8f6d04

View File

@ -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()