Skip to content

Commit

Permalink
fix: changing variable name erpcreds -> ERPCREDS
Browse files Browse the repository at this point in the history
  • Loading branch information
proffapt committed Jul 14, 2023
1 parent b259b83 commit 2192d9f
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions src/iitkgp_erp_login/erp.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,10 +12,10 @@
class ErpLoginError(Exception):
pass

def login(headers, session, erpcreds=None, OTP_CHECK_INTERVAL=None, LOGGING=False):
if erpcreds != None:
ROLL_NUMBER = erpcreds.ROLL_NUMBER
PASSWORD = erpcreds.PASSWORD
def login(headers, session, ERPCREDS=None, OTP_CHECK_INTERVAL=None, LOGGING=False):
if ERPCREDS != None:
ROLL_NUMBER = ERPCREDS.ROLL_NUMBER
PASSWORD = ERPCREDS.PASSWORD
else:
import getpass
ROLL_NUMBER = input("Enter you Roll Number: ")
Expand All @@ -34,8 +34,8 @@ def login(headers, session, erpcreds=None, OTP_CHECK_INTERVAL=None, LOGGING=Fals
secret_question = r.text
logging.info(" Fetched Security Question") if LOGGING else None

if erpcreds != None:
secret_answer = erpcreds.SECURITY_QUESTIONS_ANSWERS[secret_question]
if ERPCREDS != None:
secret_answer = ERPCREDS.SECURITY_QUESTIONS_ANSWERS[secret_question]
else:
print ("Your secret question: " + secret_question)
secret_answer = getpass.getpass("Enter the answer to the secret question: ")
Expand Down

0 comments on commit 2192d9f

Please sign in to comment.