From 8567d17babf22f6f6dd87db6b2ef1bc88592acdc Mon Sep 17 00:00:00 2001 From: Titouan Vervack Date: Thu, 8 Mar 2018 23:22:51 +0100 Subject: [PATCH] Use raw_input instead of input --- app/database/create_database.py | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/app/database/create_database.py b/app/database/create_database.py index e8d238f..6a4ce1e 100644 --- a/app/database/create_database.py +++ b/app/database/create_database.py @@ -14,7 +14,7 @@ def commit(): def check_if_overwrite(): - answer = input("Do you want to overwrite the previous database? (y/N) ") + answer = raw_input("Do you want to overwrite the previous database? (y/N) ") return answer in yes @@ -25,9 +25,9 @@ def add_all(): def recreate_from_scratch(): - confirmation = "Are you very very sure? (Will delete previous entry's!) (y/N) " + confirmation = "Are you very very sure? (Will delete previous entries!) (y/N) " check = "I acknowledge any repercussions!" - if input(confirmation) in yes and input("Type: '{}' ".format(check)) == check: + if raw_input(confirmation) in yes and raw_input("Type: '{}' ".format(check)) == check: print("Resetting the database!") db.drop_all() db.create_all() @@ -40,9 +40,9 @@ def add_to_current(): def add_numbers(): return " ".join(["{}({}), ".format(loc, i) for i, loc in enumerate(available)]).rstrip(", ") - while input("Do you still want to add something? (Y/n) ") not in no: + while raw_input("Do you still want to add something? (Y/n) ") not in no: print("What do you want to add? (Use numbers, or A for all, or C for chancel) ") - answer = input("Available: {} : ".format(add_numbers())) + answer = raw_input("Available: {} : ".format(add_numbers())) if answer == "A": add_all() available = []