Skip to content

Commit

Permalink
[ip] use string formatting instead of the + operator
Browse files Browse the repository at this point in the history
  • Loading branch information
Elad Alfassa committed Jun 2, 2013
1 parent 6b6ed4c commit 1a9fc1a
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions ip.py
Original file line number Diff line number Diff line change
Expand Up @@ -24,8 +24,8 @@ def ip(willie, trigger):
gi_city = pygeoip.GeoIP('/usr/share/GeoIP/GeoLiteCity.dat')
gi_org = pygeoip.GeoIP('/usr/share/GeoIP/GeoIPASNum.dat')
host = socket.getfqdn(query)
response = "[IP/Host Lookup] Hostname: " + host
response += " | Location: " + gi_city.country_name_by_name(query)
response = "[IP/Host Lookup] Hostname: %s" % host
response += " | Location: %s" % gi_city.country_name_by_name(query)
region = gi_city.region_by_name(query)['region_name']
if region is not '':
response += " | Region: %s" % region
Expand Down

0 comments on commit 1a9fc1a

Please sign in to comment.