Skip to content

Commit

Permalink
Merge remote-tracking branch 'origin/master' into 5.0
Browse files Browse the repository at this point in the history
  • Loading branch information
embolalia committed Dec 13, 2014
2 parents 6faaa95 + ddd1f4b commit 4352277
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion ip.py
Original file line number Diff line number Diff line change
Expand Up @@ -106,7 +106,10 @@ def ip(bot, trigger):
gi_org = pygeoip.GeoIP(geolite_ASN_filepath)
host = socket.getfqdn(query)
response = "[IP/Host Lookup] Hostname: %s" % host
response += " | Location: %s" % gi_city.country_name_by_name(query)
try:
response += " | Location: %s" % gi_city.country_name_by_name(query)
except AttributeError:
response += ' | Location: Unknown'

region_data = gi_city.region_by_name(query)
try:
Expand Down

0 comments on commit 4352277

Please sign in to comment.