Add close() method to Python class

This commit is contained in:
Grégory Soutadé 2016-02-04 20:39:50 +01:00
parent 58b0439d9d
commit f3c8feb3c5

View File

@ -88,3 +88,6 @@ class IPToGeo(object):
# convert to string # convert to string
country_code = '%c%c' % (country_code[0], country_code[1]) country_code = '%c%c' % (country_code[0], country_code[1])
return (ip, country_code) return (ip, country_code)
def close(self):
self._socket.close()