make funktions public
This commit is contained in:
parent
1401ba72a6
commit
0a7d19e719
|
@ -10,7 +10,7 @@ def _run_command(command):
|
||||||
return result
|
return result
|
||||||
|
|
||||||
|
|
||||||
def _read_disks():
|
def read_disks():
|
||||||
output = _run_command(["lsblk", "-dpno", "name"])
|
output = _run_command(["lsblk", "-dpno", "name"])
|
||||||
disks = []
|
disks = []
|
||||||
for disk in output.stdout.splitlines():
|
for disk in output.stdout.splitlines():
|
||||||
|
@ -20,29 +20,28 @@ def _read_disks():
|
||||||
return disks
|
return disks
|
||||||
|
|
||||||
|
|
||||||
def _create_menu(disks):
|
def create_menu(disks):
|
||||||
for id, disk in enumerate(disks):
|
for id, disk in enumerate(disks):
|
||||||
print("{}: {}".format(id, disk))
|
print("{}: {}".format(id, disk))
|
||||||
|
|
||||||
|
|
||||||
def _get_disk_to_format():
|
def get_disk_to_format():
|
||||||
disk_to_format = input("Which disk dou you want to format?: ")
|
disk_to_format = input("Which disk dou you want to format?: ")
|
||||||
return disk_to_format
|
return disk_to_format
|
||||||
|
|
||||||
|
|
||||||
def _format_disk(disk_to_format):
|
def format_disk(disk_to_format):
|
||||||
print("Formatting disk: {}.".format(disk_to_format))
|
print("Formatting disk: {}.".format(disk_to_format))
|
||||||
pass
|
pass
|
||||||
|
|
||||||
|
|
||||||
def _encrypt_disk():
|
def encrypt_disk():
|
||||||
print("Encrypting disk.")
|
print("Encrypting disk.")
|
||||||
pass
|
pass
|
||||||
|
|
||||||
|
|
||||||
def main():
|
def main():
|
||||||
disks = _read_disks()
|
disks = read_disks()
|
||||||
_create_menu(disks)
|
|
||||||
|
|
||||||
|
|
||||||
if __name__ == "__main__":
|
if __name__ == "__main__":
|
||||||
|
|
Loading…
Reference in New Issue