131
133
def _check_query(self, query, country=False, city=False, city_or_country=False):
132
134
"Helper routine for checking the query and database availability."
133
135
# Making sure a string was passed in for the query.
135
137
raise TypeError('GeoIP query must be a string, not type %s' % type(query).__name__)
137
139
# GeoIP only takes ASCII-encoded strings.