Removed redundant GeoIP2._check_query() calls.

This commit is contained in:
Nick Pope 2021-04-05 22:55:51 +01:00 committed by Mariusz Felisiak
parent adcb3a7a27
commit 7d5058d870
1 changed files with 2 additions and 4 deletions

View File

@ -171,13 +171,11 @@ class GeoIP2:
def country_code(self, query): def country_code(self, query):
"Return the country code for the given IP Address or FQDN." "Return the country code for the given IP Address or FQDN."
enc_query = self._check_query(query, city_or_country=True) return self.country(query)['country_code']
return self.country(enc_query)['country_code']
def country_name(self, query): def country_name(self, query):
"Return the country name for the given IP Address or FQDN." "Return the country name for the given IP Address or FQDN."
enc_query = self._check_query(query, city_or_country=True) return self.country(query)['country_name']
return self.country(enc_query)['country_name']
def country(self, query): def country(self, query):
""" """