diff --git a/modules/swap/module.py b/modules/swap/module.py index 9f7d370..49d3ef7 100644 --- a/modules/swap/module.py +++ b/modules/swap/module.py @@ -38,8 +38,8 @@ class SwapModule(AbstractModule): def _swap_location_check(self): output_swaps = subprocess.check_output(['cat', '/proc/swaps']).decode("UTF-8") - swap_location = output_swaps.split()[5] try: + swap_location = output_swaps.split()[5] print("Swap is located here:", swap_location) self.swap_file = swap_location except IndexError: @@ -47,8 +47,8 @@ class SwapModule(AbstractModule): def _get_swap_size(self): swap_size = subprocess.check_output(['swapon', '--show']).decode("UTF-8") - swap_size = swap_size.split()[7] try: + swap_size = swap_size.split()[7] print("Swap is {}b big!".format(swap_size)) except IndexError: print("Swap file doesn´t exist!")