Skip to content

Commit

Permalink
fix: removed is_otp_required()
Browse files Browse the repository at this point in the history
  • Loading branch information
proffapt committed Jul 10, 2024
1 parent 56b87a7 commit 5c30733
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 9 deletions.
3 changes: 0 additions & 3 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -18,10 +18,7 @@ classifiers = [
]
dependencies = [
"bs4",
"flask",
"ping3",
"requests",
"flask_cors",
"google-auth",
"google-auth-oauthlib",
"google-auth-httplib2",
Expand Down
6 changes: 0 additions & 6 deletions src/iitkgp_erp_login/erp.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@
import os
import re
import sys
import ping3
import getpass
import inspect
import requests
Expand Down Expand Up @@ -96,11 +95,6 @@ def get_login_details(ROLL_NUMBER: str, PASSWORD: str, secret_answer: str, sessi
return login_details


def is_otp_required():
"""Checks whether the request is run from the campus network (OTP not required) or not."""
return not ping3.ping("iitkgp.ac.in")


def request_otp(headers: dict[str, str], session: requests.Session, login_details: LoginDetails, log: bool = False):
"""Requests an OTP to be sent."""
try:
Expand Down

0 comments on commit 5c30733

Please sign in to comment.