Skip to content

Commit

Permalink
Updated PhoneBook.py
Browse files Browse the repository at this point in the history
Unnecessary print statements removed.
ayushjain01 authored Jan 1, 2021

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature. The key has expired.
1 parent cce003d commit d9d7a42
Showing 1 changed file with 0 additions and 6 deletions.
6 changes: 0 additions & 6 deletions PhoneBook.py
Original file line number Diff line number Diff line change
@@ -114,7 +114,6 @@ def delete(self):

def intcheck(self, num):
for i in num:
print(i)
if ord(i) > 57 or ord(i) < 48:
return False
return True
@@ -136,7 +135,6 @@ def save():
if FN == "" or LN == "" or MN == "" or PN == "" or EI == "" or IH == "" or NS == "":
result = tkMessageBox.showwarning(
'Error : All Fields Not Filled', 'Please Complete The Required Fields', icon="warning")
print(self.intcheck(MN), self.intcheck(PN))
if self.intcheck(MN) == False or self.intcheck(PN) == False:

result = tkMessageBox.showwarning('Error : Invalid Mobile or Phone Number',
@@ -147,10 +145,6 @@ def save():
f'SELECT * FROM CONTACTS_TABLE WHERE Mobile_Number = {int(MN)}')
res = self.cursor.fetchall()
if len(res) == 0:

print(
F"""INSERT INTO CONTACTS_TABLE VALUES({FN},{LN},{MN},{PN},{EI},{IH},{NS})""")

self.cursor.execute(F"""INSERT INTO CONTACTS_TABLE VALUES(
'{FN}','{LN}',{MN},{PN},'{EI}','{IH}','{NS}')
""")

0 comments on commit d9d7a42

Please sign in to comment.