Skip to content

Commit

Permalink
Fixed colours not showing up, connects to db after password confirmation
Browse files Browse the repository at this point in the history
  • Loading branch information
SVijayB committed Jul 8, 2020
1 parent 604bfe7 commit 819d833
Showing 1 changed file with 9 additions and 6 deletions.
15 changes: 9 additions & 6 deletions Password Manager/src/Password_manager.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,8 @@
from Modules.Functions import *
from Modules.Colours import *

conn = sqlite3.connect('../assets/Database.db')
cursor = conn.cursor()

if __name__ == "__main__":
os.system('cls')
try:
conn.execute('''CREATE TABLE DETAILS
(ACCOUNT TEXT PRIMARY KEY NOT NULL,
Expand All @@ -30,17 +28,22 @@
else:
red("Incorrect password")
except:
print("Since, this is the first time you are using Password_manager, Create a password")
cyan("NOTE : DO NOT FORGET THIS PASSWORD. YOU CANNOT CHANGE IT LATER")
green("PASSWORD MANAGER")
cyan("-" * 25)
print("Since, this is the first time you are using Password_manager, Create a password.")
red("DO NOT FORGET THIS PASSWORD. YOU CANNOT CHANGE IT LATER.")
password = input("Enter your password \n> ")
file = open('../temp/password.txt', 'w')
file.write(password)
green("Your password has been saved successfully")
cyan("Relaunch the application to continue....")
cyan("Relaunch the application to continue.")
grey("Press enter to exit...")
input()
sys.exit(0)

conn = sqlite3.connect('../assets/Database.db')
cursor = conn.cursor()

os.system('cls')
logo = open("../assets/logo.txt","r")
output = "".join(logo.readlines())
Expand Down

0 comments on commit 819d833

Please sign in to comment.