a lot of pyflakes and pylint fixes

This commit is contained in:
Romain Bignon 2010-08-13 22:23:10 +02:00
commit 404d7290ba
43 changed files with 94 additions and 13 deletions

View file

@ -16,3 +16,5 @@
# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
from .backend import ArteBackend
__all__ = ['ArteBackend']

View file

@ -18,3 +18,5 @@
from .browser import AuMBrowser
from .backend import AuMBackend
__all__ = ['AuMBrowser', 'AuMBackend']

View file

@ -30,7 +30,7 @@ class WaitPage(PageBase):
return result == 'Ok'
def process_wait(self):
while not self.check(self):
while not self.check():
sleep(10)
self.browser.location('/home.php')

View file

@ -17,3 +17,5 @@
from .backend import BNPorcBackend
__all__ = ['BNPorcBackend']

View file

@ -22,3 +22,6 @@ from .account_history import AccountHistory
from .login import LoginPage, ConfirmPage
class AccountPrelevement(AccountsList): pass
__all__ = ['AccountsList', 'AccountComing', 'AccountHistory', 'LoginPage',
'ConfirmPage', 'AccountPrelevement']

View file

@ -17,3 +17,5 @@
from .backend import CanalTPBackend
__all__ = ['CanalTPBackend']

View file

@ -17,3 +17,5 @@
from .backend import CragrBackend
__all__ = ['CragrBackend']

View file

@ -18,3 +18,5 @@
from .accounts_list import AccountsList
from .login import LoginPage
__all__ = ['AccountsList', 'LoginPage']

View file

@ -83,12 +83,12 @@ class Article(object):
if a.text: self.title += a.text
if a.tail: self.title += a.tail
self.title = self.title.strip()
subdivs = div.findall('a')
if len(subdivs) > 1:
date_s = unicode(subdivs[1].text)
else:
date_s = unicode(div.find('i').tail)
#print date_s
# TODO use the date_s
#subdivs = div.findall('a')
#if len(subdivs) > 1:
# date_s = unicode(subdivs[1].text)
#else:
# date_s = unicode(div.find('i').tail)
if div.attrib.get('class', '').startswith('bodydiv '):
self.body = self.browser.parser.tostring(div)

View file

@ -1,2 +1,4 @@
from .backend import FourChanBackend
from .browser import FourChan
__all__ = ['FourChanBackend', 'FourChan']

View file

@ -1 +1,3 @@
from .backend import GazelleBackend
__all__ = ['GazelleBackend']

View file

@ -167,6 +167,7 @@ class TorrentsPage(BasePage):
div = self.document.getroot().cssselect('div#files_%s' % torrent.id)
if div:
torrent.files = []
for tr in div[0].find('table'):
if tr.attrib.get('class', None) != 'colhead_dark':
torrent.files.append(tr.find('td').text)

View file

@ -1 +1,3 @@
from .backend import GeolocIpBackend
__all__ = ['GeolocIpBackend']

View file

@ -1 +1,3 @@
from .backend import InaBackend
__all__ = ['InaBackend']

View file

@ -17,3 +17,5 @@
from .backend import TransilienBackend
__all__ = ['TransilienBackend']

View file

@ -17,3 +17,5 @@
from .backend import YahooBackend
__all__ = ['YahooBackend']

View file

@ -51,12 +51,12 @@ class YahooBackend(BaseBackend, ICapWeather):
return dom
def get_current(self, city_id):
dom = self._get_dom(city_id)
dom = self._get_weather_dom(city_id)
current = dom.getElementsByTagName('yweather:condition')[0]
return Current(current.getAttribute('date'), int(current.getAttribute('temp')), current.getAttribute('text'), 'C')
def iter_forecast(self, city_id):
dom = self._get_dom(city_id)
dom = self._get_weather_dom(city_id)
for forecast in dom.getElementsByTagName('yweather:forecast'):
yield Forecast(forecast.getAttribute('date'),
int(forecast.getAttribute('low')),

View file

@ -16,3 +16,5 @@
# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
from .backend import YoujizzBackend
__all__ = ['YoujizzBackend']

View file

@ -1 +1,3 @@
from .backend import YoupornBackend
__all__ = ['YoupornBackend']

View file

@ -16,3 +16,5 @@
# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
from .backend import YoutubeBackend
__all__ = ['YoutubeBackend']