diff options
| author | Nick Pope <nick@nickpope.me.uk> | 2021-04-05 23:03:04 +0100 |
|---|---|---|
| committer | Mariusz Felisiak <felisiak.mariusz@gmail.com> | 2021-12-02 11:30:42 +0100 |
| commit | 97e9a84d2746f76a635455c13bd512ea408755ac (patch) | |
| tree | 04516c76d6af08437ca8a93643a476624f706815 | |
| parent | 7d5058d870bd3f2973122f39c235a10a3fda4162 (diff) | |
Removed unused country argument from GeoIP2._check_query().
Unused since its introduction in 79e68c225b926302ebb29c808dda8afa49856f5c.
| -rw-r--r-- | django/contrib/gis/geoip2/base.py | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/django/contrib/gis/geoip2/base.py b/django/contrib/gis/geoip2/base.py index 1fd766f443..bcd8f1e2d8 100644 --- a/django/contrib/gis/geoip2/base.py +++ b/django/contrib/gis/geoip2/base.py @@ -138,7 +138,7 @@ class GeoIP2: '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." # Making sure a string was passed in for the query. if not isinstance(query, str): @@ -147,8 +147,6 @@ class GeoIP2: # Extra checks for the existence of country and city databases. if city_or_country and not (self._country or self._city): 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: raise GeoIP2Exception('Invalid GeoIP city data file: %s' % self._city_file) |
