fix bad behaviors

This commit is contained in:
Romain Bignon 2012-02-14 20:27:17 +01:00
commit cbefbe81d2
5 changed files with 17 additions and 14 deletions

View file

@ -96,6 +96,7 @@ class WetBoobs(ReplApplication):
Search cities.
"""
self.change_path('/cities')
for backend, city in self.do('iter_city_search', pattern, caps=ICapWeather):
self.add_object(city)
self.format(city)
@ -142,6 +143,7 @@ class WetBoobs(ReplApplication):
List all rivers. If PATTERN is specified, search on a pattern.
"""
self.change_path('/gauges')
for backend, gauge in self.do('iter_gauges', pattern or None, caps=ICapWaterLevel):
self.add_object(gauge)
self.format(gauge)