first commit
This commit is contained in:
14
functions/get_confirmation.py
Normal file
14
functions/get_confirmation.py
Normal file
@@ -0,0 +1,14 @@
|
||||
def get_confirmation(backup_extension, selected_book):
|
||||
print(f"Backup type: {backup_extension}")
|
||||
while True:
|
||||
confirm = input("Are these settings correct? (y/n): ").strip().lower()
|
||||
if confirm == "y":
|
||||
print(f"Starting backup for book: {selected_book['name']} with filetype {backup_extension}.")
|
||||
print("Starting now.......")
|
||||
return True
|
||||
elif confirm == "n":
|
||||
print("Stopping now.....")
|
||||
return False
|
||||
else:
|
||||
print("Please enter 'y' or 'n'.")
|
||||
|
||||
Reference in New Issue
Block a user