fix broken stuff when checking with python3

This commit is contained in:
carnal0wnage
2018-04-05 15:59:17 -04:00
parent 518c266059
commit e398484508
4 changed files with 22 additions and 18 deletions

View File

@@ -8,8 +8,8 @@ def create_table(db_name,table_name,sql):
result = cursor.fetchall()
keep_table = True
if len(result) == 1:
#python 2
response = raw_input("The table {} already exists, do you wish to recreate it? (y/n): ".format(table_name))
#python 3
response = input("The table {} already exists, do you wish to recreate it? (y/n): ".format(table_name))
if response == "y":
keep_table = False
print("The {} table will be recreated - all existing data will be lost".format(table_name))