pep8 cleaning / useless TODO
This commit is contained in:
parent
5508f3a401
commit
648c28b31c
2 changed files with 5 additions and 10 deletions
|
|
@ -1,6 +1,6 @@
|
||||||
# -*- coding: utf-8 -*-
|
# -*- coding: utf-8 -*-
|
||||||
|
|
||||||
# Copyright(C) 2010-2011 Romain Bignon
|
# Copyright(C) 2010-2014 Romain Bignon
|
||||||
#
|
#
|
||||||
# This file is part of weboob.
|
# This file is part of weboob.
|
||||||
#
|
#
|
||||||
|
|
|
||||||
|
|
@ -1,6 +1,6 @@
|
||||||
# -*- coding: utf-8 -*-
|
# -*- coding: utf-8 -*-
|
||||||
|
|
||||||
# Copyright(C) 2010-2011 Romain Bignon
|
# Copyright(C) 2010-2014 Romain Bignon
|
||||||
#
|
#
|
||||||
# This file is part of weboob.
|
# This file is part of weboob.
|
||||||
#
|
#
|
||||||
|
|
@ -17,15 +17,10 @@
|
||||||
# You should have received a copy of the GNU Affero General Public License
|
# You should have received a copy of the GNU Affero General Public License
|
||||||
# along with weboob. If not, see <http://www.gnu.org/licenses/>.
|
# along with weboob. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
import urllib2
|
import urllib2
|
||||||
from xml.dom import minidom
|
from xml.dom import minidom
|
||||||
from dateutil.parser import parse as parse_dt
|
from dateutil.parser import parse as parse_dt
|
||||||
|
|
||||||
# TODO store datetime objects instead of strings
|
|
||||||
# from datetime import datetime
|
|
||||||
|
|
||||||
from weboob.capabilities.weather import ICapWeather, CityNotFound, Current, Forecast, City
|
from weboob.capabilities.weather import ICapWeather, CityNotFound, Current, Forecast, City
|
||||||
from weboob.tools.backend import BaseBackend
|
from weboob.tools.backend import BaseBackend
|
||||||
|
|
@ -57,7 +52,7 @@ class YahooBackend(BaseBackend, ICapWeather):
|
||||||
doc = self.browser.location(self.browser.buildurl('http://locdrop.query.yahoo.com/v1/public/yql', **args))
|
doc = self.browser.location(self.browser.buildurl('http://locdrop.query.yahoo.com/v1/public/yql', **args))
|
||||||
|
|
||||||
cities = doc['query']['results']['Result']
|
cities = doc['query']['results']['Result']
|
||||||
if not isinstance(cities, (tuple,list)):
|
if not isinstance(cities, (tuple, list)):
|
||||||
cities = [cities]
|
cities = [cities]
|
||||||
|
|
||||||
for result in cities:
|
for result in cities:
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue