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