use lower_case_with_underscores instead of mixedCase for methods (PEP 8)
This commit is contained in:
parent
e4846ff2a4
commit
d699e307dd
21 changed files with 177 additions and 185 deletions
|
|
@ -26,7 +26,8 @@ class DLFPBackend(Backend, ICapMessages, ICapMessagesReply):
|
|||
def __init__(self, weboob):
|
||||
Backend.__init__(self, weboob)
|
||||
|
||||
def iterNewMessages(self, thread=None):
|
||||
def iter_new_messages(self, thread=None):
|
||||
articles_list = ArticlesList('newspaper')
|
||||
for id, author, title in articles_list.iter_articles():
|
||||
yield Message('threadid', id, title, author, signature='Bite bite bite bite', content='Content content\nContent content.')
|
||||
yield Message('threadid', id, title, author, signature='Bite bite bite bite',
|
||||
content='Content content\nContent content.')
|
||||
|
|
|
|||
|
|
@ -36,5 +36,5 @@ class DLFP(Browser):
|
|||
def login(self):
|
||||
self.location('/login.html', 'login=%s&passwd=%s&isauto=1' % (self.username, self.password))
|
||||
|
||||
def isLogged(self):
|
||||
return (self.page and self.page.isLogged())
|
||||
def is_logged(self):
|
||||
return (self.page and self.page.is_logged())
|
||||
|
|
|
|||
|
|
@ -21,7 +21,7 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
|||
from weboob.tools.browser import BrowserIncorrectPassword, BasePage
|
||||
|
||||
class DLFPPage(BasePage):
|
||||
def isLogged(self):
|
||||
def is_logged(self):
|
||||
forms = self.document.getElementsByTagName('form')
|
||||
for form in forms:
|
||||
if form.getAttribute('id') == 'formulaire':
|
||||
|
|
@ -35,10 +35,10 @@ class IndexPage(DLFPPage):
|
|||
class LoginPage(DLFPPage):
|
||||
|
||||
def loaded(self):
|
||||
if self.hasError():
|
||||
if self.has_error():
|
||||
raise BrowserIncorrectPassword()
|
||||
|
||||
def hasError(self):
|
||||
def has_error(self):
|
||||
plist = self.document.getElementsByTagName('p')
|
||||
for p in plist:
|
||||
p = p.childNodes[0]
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue