Skip to content

Commit

Permalink
bugfix in db selection
Browse files Browse the repository at this point in the history
  • Loading branch information
doit committed Mar 28, 2011
1 parent 62c2750 commit 68be23b
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/geodis.py
Original file line number Diff line number Diff line change
Expand Up @@ -74,14 +74,14 @@ def importZIPCode(fileName):


def resolveIP(ip):
r = redis.Redis(host = redis_host, port = redis_port)
r = redis.Redis(host = redis_host, port = redis_port, db = redis_db)

loc = IPRange.getCity(ip, r)
print loc


def resolveCoords(lat, lon):
r = redis.Redis(host = redis_host, port = redis_port)
r = redis.Redis(host = redis_host, port = redis_port, db = redis_db)
loc = City.getByLatLon(lat, lon, r)
print loc

Expand Down Expand Up @@ -135,4 +135,4 @@ def resolveCoords(lat, lon):
resolveCoords(*coords)

print "Success!"
sys.exit(0)
sys.exit(0)

0 comments on commit 68be23b

Please sign in to comment.