Used frozenset instead of dict for GeoIP2.cache_options for simplicity.

This commit is contained in:
Sergey Fedoseev 2017-08-23 20:47:47 +05:00 committed by Tim Graham
parent fac74b84a3
commit 4302167939
1 changed files with 1 additions and 1 deletions

View File

@ -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 = ''