Fix stupid bug caused by me misusing msg.respond.

This commit is contained in:
Schuyler Erle 2012-03-10 16:12:02 +05:30
parent 3ec6605c75
commit 45d13dfee3

View File

@ -23,7 +23,7 @@ class App(AppBase):
if DIGIT.search(msg.text): if DIGIT.search(msg.text):
routes = ChaloBest.routes(q=msg.text.replace(" ", "")) routes = ChaloBest.routes(q=msg.text.replace(" ", ""))
if not routes: if not routes:
msg.respond("Sorry, we found no route marked '%s'." % msg.text) msg.respond("Sorry, we found no route marked '%(text)s'.", text=msg.text)
return return
detail = ChaloBest.route[routes[0]] detail = ChaloBest.route[routes[0]]
stops = detail['stops']['features'] stops = detail['stops']['features']
@ -35,7 +35,7 @@ class App(AppBase):
else: else:
features = ChaloBest.stops(q=msg.text)['features'] features = ChaloBest.stops(q=msg.text)['features']
if not features: if not features:
msg.respond("Sorry, we found no stops like '%s'." % msg.text) msg.respond("Sorry, we found no stops marked '%(text)s'.", text=msg.text)
return return
stops = [] stops = []
for feat in features: for feat in features: