Simplify initialization of databases in the GeoIP2 wrapper
The initialization of the wrapper around the GeoIP2 databases is overcomplicated and should be simplified.
Currently when calling GeoIP2.city()
and GeoIP2.country()
the city and country databases will be used respectively, but this is unnecessary as the country database is merely a subset of the city database. It should be possible to provide a path and attempt to open a database from three possible candidates: path
, path / city
, and path / country
. While a minor incompatibility in that the city database may be used instead, this also reduces the potential for mixing data from two different databases where one might be outdated.
Change History
(7)
Triage Stage: |
Unreviewed → Accepted
|
Patch needs improvement: |
set
|
Patch needs improvement: |
unset
|
Triage Stage: |
Accepted → Ready for checkin
|
Resolution: |
→ fixed
|
Status: |
assigned → closed
|
PR