def Login(mobile_no=''): f=1 try: if(mobile_no==''): mobile_no=raw_input("Mobile Number:") validate_mobile_no.validate_mobile_no(mobile_no) list1=get_credentials(mobile_no) user1=list1[0] mob_value=user1.get_mobile_no() password=raw_input("Password:"******"Login Successfull") f=0 login_page.login_page(mob_value) except: print ("some error occured") finally: if(f!=0): status=True while(status==True): choice=raw_input("Do you wish to continue login (Y/N)?") if choice.upper() == "Y": Login(mobile_no) status=False elif(choice.upper()=='N'): status=False else: print("Enter a valid choice")
def Forgot_Password(): try: f=0 mobile_no=raw_input("Enter Mobile Number:") usr=set_values(mobile_no) validate_mobile_no.validate_mobile_no(mobile_no) dob=usr.get_dob() #dob=datetime.date(dob) #dob=str(dob).split('-') #print("Enter Date Of Birth:") #list1=['YYYY','MM','DD'] #x=random.randrange(0,2) #val=raw_input(list1[x]) #3validate_dob_security(dob[x],val) sec_qn=usr.get_sec_qn() print(sec_qn,"answe to you security question is") ans=raw_input("Answer : ") sec_ans=usr.get_sec_ans() validate_security.validate_security(sec_ans, ans) change_password(mobile_no,1) f=1 except InvalidMobileNumberException as e: print(e) except SecurityException as e: print(e) except InvalidDateException as e: print(e) except: print("Error") finally: if(f!=1): st=True while(st==True): print("Do you wish to continue(Y/N)?") status =raw_input() if(status.upper()=='Y'): Forgot_Password() st=False elif(status.upper()=='N'): st=False else: print("Enter a valid Choice")