diff options
| author | Sergey Fedoseev <fedoseev.sergey@gmail.com> | 2017-08-23 20:47:47 +0500 |
|---|---|---|
| committer | Tim Graham <timograham@gmail.com> | 2017-08-23 11:47:47 -0400 |
| commit | 4302167939767e713388c49d8af3cefe27695629 (patch) | |
| tree | 9cb41264cfd3db48c62c0e21c203f5501654b90c | |
| parent | fac74b84a3abd92f1a49070f31ec7c8c0df8b698 (diff) | |
Used frozenset instead of dict for GeoIP2.cache_options for simplicity.
| -rw-r--r-- | django/contrib/gis/geoip2/base.py | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/django/contrib/gis/geoip2/base.py b/django/contrib/gis/geoip2/base.py index 40b45fd72b..b1035ac6ff 100644 --- a/django/contrib/gis/geoip2/base.py +++ b/django/contrib/gis/geoip2/base.py @@ -33,7 +33,7 @@ class GeoIP2: MODE_FILE = 4 # Load database into memory. Pure Python. MODE_MEMORY = 8 - cache_options = {opt: None for opt in (0, 1, 2, 4, 8)} + cache_options = frozenset((MODE_AUTO, MODE_MMAP_EXT, MODE_MMAP, MODE_FILE, MODE_MEMORY)) # Paths to the city & country binary databases. _city_file = '' |
