Commit fa3bdce4 authored by Laurent Bachelier's avatar Laurent Bachelier 🐧 Committed by Vincent A

phpbb: flake8 fixes, Python 3

parent 2b9613eb
......@@ -20,15 +20,14 @@
import re
from weboob.browser import LoginBrowser, need_login, URL
from weboob.exceptions import BrowserIncorrectPassword
from weboob.browser import URL, LoginBrowser, need_login
from weboob.capabilities.messages import CantSendMessage
from weboob.exceptions import BrowserIncorrectPassword
from import ForumPage, PostingPage, TopicPage
from .pages.index import LoginPage
from import ForumPage, TopicPage, PostingPage
from .tools import id2url, url2id
__all__ = ['PhpBB']
......@@ -56,7 +55,7 @@ class PhpBB(LoginBrowser):
data = {'login': 'Connexion',
'username': self.username,
'password': self.password,
self.location('ucp.php?mode=login', data=data)
if not
......@@ -158,7 +157,7 @@ class PhpBB(LoginBrowser):
raise CantSendMessage('Please enter a title formatted like that:\n\t"[FORUM] SUBJECT"\n\n%s' % forums_prompt)
forum_id = None
for k,v in forums.iteritems():
for k, v in forums.items():
if v.lower() ==
forum_id = k
......@@ -18,15 +18,14 @@
# along with weboob. If not, see <>.
from import Module, BackendConfig
from import Newsfeed
from import Value, ValueInt, ValueBackendPassword
from weboob.capabilities.messages import CantSendMessage, CapMessages, CapMessagesPost, Message, Thread
from import BackendConfig, Module
from import limit
from weboob.capabilities.messages import CapMessages, CapMessagesPost, Message, Thread, CantSendMessage
from import Newsfeed
from import Value, ValueBackendPassword, ValueInt
from .browser import PhpBB
from .tools import rssid, url2id, id2url, id2topic
from .tools import id2topic, id2url, rssid, url2id
__all__ = ['PhpBBModule']
......@@ -42,7 +41,7 @@ class PhpBBModule(Module, CapMessages, CapMessagesPost):
Value('username', label='Username', default=''),
ValueBackendPassword('password', label='Password', default=''),
ValueInt('thread_unread_messages', label='Limit number of unread messages to retrieve for a thread', default=500)
STORAGE = {'seen': {}}
......@@ -29,7 +29,7 @@ from import parse_date
class Link(object):
TOPIC) = xrange(2)
TOPIC) = range(2)
def __init__(self, type, url):
self.type = type
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment