Fix return type, remove unnecessary space
Add newline to .gitignore
This commit is contained in:
parent
153b8f6d04
commit
dcb5681aa3
@ -85,7 +85,6 @@ class SwapModule(AbstractModule):
|
|||||||
self._swap_location_check()
|
self._swap_location_check()
|
||||||
backup_fstab = "sudo cp /etc/fstab /etc/fstab.bak"
|
backup_fstab = "sudo cp /etc/fstab /etc/fstab.bak"
|
||||||
enable_persistence = "echo '{} none swap sw 0 0' | sudo tee -a /etc/fstab".format(self.swap_file)
|
enable_persistence = "echo '{} none swap sw 0 0' | sudo tee -a /etc/fstab".format(self.swap_file)
|
||||||
|
|
||||||
subprocess.call(backup_fstab, shell=True)
|
subprocess.call(backup_fstab, shell=True)
|
||||||
subprocess.call(enable_persistence, shell=True)
|
subprocess.call(enable_persistence, shell=True)
|
||||||
print("Swap is now persistent!")
|
print("Swap is now persistent!")
|
||||||
@ -116,9 +115,9 @@ class SwapModule(AbstractModule):
|
|||||||
print("Temporary swapiness is " + str(options[selected_swapiness]))
|
print("Temporary swapiness is " + str(options[selected_swapiness]))
|
||||||
|
|
||||||
def _delete_swap(self):
|
def _delete_swap(self):
|
||||||
location = self._swap_location_check()
|
self._swap_location_check()
|
||||||
if location == "NoSwap":
|
if self.swap_file is None:
|
||||||
return None
|
return
|
||||||
else:
|
else:
|
||||||
disable_swapfile = "sudo swapoff {} && ".format(self.swap_file) + \
|
disable_swapfile = "sudo swapoff {} && ".format(self.swap_file) + \
|
||||||
"sudo rm {}".format(self.swap_file)
|
"sudo rm {}".format(self.swap_file)
|
||||||
|
Loading…
Reference in New Issue
Block a user