Jun-12-2020, 02:40 PM
I Am new to Phyton coding, and i have question like, user will allow to login if there is no IP address found.
please find below and let me know is there any changes required and where..?
please find below and let me know is there any changes required and where..?
def get_location_object(ip_address): Try: Return GeoLite2IPLocation(ip_address=ip_address) except IpAddressLocationNotFound: Return FreeGeoIPLocation(ip_address=ip_address) location = get_location_object(ip_address=self.ip_address) Logger.info( { “login_credentials”: login_crendtials, “is_valid_user”: True if self.account else false, “Country”: location.country, “Description”: “LOGIN”, } )