Commit 9269edb7 by Ivan Dyedov

fix for UnicodeWarning when accessing a city database with MEMORY_CACHE. fixes Issue #16

parent 2bd928e6
......@@ -125,7 +125,7 @@ class GeoIP(GeoIPBase):
for i in range(const.STRUCTURE_INFO_MAX_SIZE):
delim = self._filehandle.read(3)
if delim == six.u(chr(255) * 3):
if delim == six.b(chr(255) * 3):
self._databaseType = ord(self._filehandle.read(1))
if (self._databaseType >= 106):
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment