appliedsec / pygeoip

DEPRECATED: Pure Python API for Maxmind's binary GeoIP databases
https://github.com/appliedsec/pygeoip
GNU Lesser General Public License v3.0
481 stars 111 forks source link

"pygeoip __init__.py _gethostbyname" Error. #76

Closed BhaiX closed 9 years ago

BhaiX commented 9 years ago

Hello,

I hope you guys know there is a python IRC bot Willie, To make his .ip command work we need pygeoip, I've installed it and its working but when I type.

@Bhai .ip Bhai

gaierror: [Errno -2] Name or service not known (file "/usr/local/lib/python2.7/dist-packages/pygeoip/**init**.py", line 394, in _gethostbyname) This Error, Any way to fix it?
tiwilliam commented 9 years ago

Since Bhai isn't a valid hostname our underlying socket library will complain. pygeoip won't catch and re-raise this error so if you want a nicer presentation you'll have to catch this in Willie.