diff --git a/.gitignore b/.gitignore index 61e041f..e7e232e 100644 --- a/.gitignore +++ b/.gitignore @@ -1,4 +1,3 @@ __pycache__ .vscode -devenv -env \ No newline at end of file +devenv \ No newline at end of file diff --git a/modules/swap/module.py b/modules/swap/module.py index 53e421b..e65c13c 100644 --- a/modules/swap/module.py +++ b/modules/swap/module.py @@ -44,7 +44,7 @@ class SwapModule(AbstractModule): self.swap_file = final_list[5] except IndexError: print("Swap file doesn´t exist!") - return "None" + return None def get_swap_size(self): swap_size = subprocess.check_output(['swapon', '--show']).decode("UTF-8") @@ -118,7 +118,7 @@ class SwapModule(AbstractModule): def delete_swap(self): location = self.swap_location_check() - if location == "None": + if location is None: return None else: disable_swapfile = "sudo swapoff {} && ".format(self.swap_file) + \