This commit is contained in:
Romain Bignon 2010-04-16 16:33:28 +02:00
commit de25e6d05b

View file

@ -35,7 +35,7 @@ class WetBoobs(ConsoleApplication):
print '| ID | Name |' print '| ID | Name |'
print '+--------------------------------+---------------------------------------------+' print '+--------------------------------+---------------------------------------------+'
count = 0 count = 0
for backend, in self.weboob.iter_backends(): for backend in self.weboob.iter_backends():
for city in backend.iter_city_search(pattern): for city in backend.iter_city_search(pattern):
print u'| %-31s| %-44s|' % (city.city_id, city.name) print u'| %-31s| %-44s|' % (city.city_id, city.name)
count += 1 count += 1
@ -49,7 +49,7 @@ class WetBoobs(ConsoleApplication):
print '| Temperature | Text |' print '| Temperature | Text |'
print '+-------------+----------------------------------------------------------------+' print '+-------------+----------------------------------------------------------------+'
found = 0 found = 0
for backend, in self.weboob.iter_backends(): for backend in self.weboob.iter_backends():
try: try:
current = backend.get_current(city) current = backend.get_current(city)
print u'| %-12s| %-63s|' % (u'%d °%s' % (current.temp, current.unit), current.text) print u'| %-12s| %-63s|' % (u'%d °%s' % (current.temp, current.unit), current.text)
@ -67,7 +67,7 @@ class WetBoobs(ConsoleApplication):
print '| Date | Min | Max | Text |' print '| Date | Min | Max | Text |'
print '+-------------+-------+-------+------------------------------------------------+' print '+-------------+-------+-------+------------------------------------------------+'
found = 0 found = 0
for backend, in self.weboob.iter_backends(): for backend in self.weboob.iter_backends():
try: try:
for f in backend.iter_forecast(city): for f in backend.iter_forecast(city):
found = 1 found = 1