Removed unused country argument from GeoIP2._check_query().

Unused since its introduction in 79e68c225b.
This commit is contained in:
Nick Pope 2021-04-05 23:03:04 +01:00 committed by Mariusz Felisiak
parent 7d5058d870
commit 97e9a84d27
1 changed files with 1 additions and 3 deletions

View File

@ -138,7 +138,7 @@ class GeoIP2:
'city': self._city_file, 'city': self._city_file,
} }
def _check_query(self, query, country=False, city=False, city_or_country=False): def _check_query(self, query, city=False, city_or_country=False):
"Check the query and database availability." "Check the query and database availability."
# Making sure a string was passed in for the query. # Making sure a string was passed in for the query.
if not isinstance(query, str): if not isinstance(query, str):
@ -147,8 +147,6 @@ class GeoIP2:
# Extra checks for the existence of country and city databases. # Extra checks for the existence of country and city databases.
if city_or_country and not (self._country or self._city): if city_or_country and not (self._country or self._city):
raise GeoIP2Exception('Invalid GeoIP country and city data files.') raise GeoIP2Exception('Invalid GeoIP country and city data files.')
elif country and not self._country:
raise GeoIP2Exception('Invalid GeoIP country data file: %s' % self._country_file)
elif city and not self._city: elif city and not self._city:
raise GeoIP2Exception('Invalid GeoIP city data file: %s' % self._city_file) raise GeoIP2Exception('Invalid GeoIP city data file: %s' % self._city_file)