pyflakes fixes
This commit is contained in:
parent
41412941a9
commit
3b2fb9cfbd
4 changed files with 8 additions and 11 deletions
|
|
@ -51,7 +51,7 @@ class GdfSuezBackend(BaseBackend, ICapBill):
|
|||
|
||||
def get_subscription(self, _id):
|
||||
if not _id.isdigit():
|
||||
raise SubscriptionnotFound()
|
||||
raise SubscriptionNotFound()
|
||||
with self.browser:
|
||||
subscription = self.browser.get_subscription(_id)
|
||||
if not subscription:
|
||||
|
|
@ -65,7 +65,7 @@ class GdfSuezBackend(BaseBackend, ICapBill):
|
|||
with self.browser:
|
||||
for history in self.browser.get_history(subscription):
|
||||
yield history
|
||||
|
||||
|
||||
def get_details(self, subscription):
|
||||
if not isinstance(subscription, Subscription):
|
||||
subscription = self.get_subscription(subscription)
|
||||
|
|
|
|||
|
|
@ -44,11 +44,11 @@ class GdfSuez(BaseBrowser):
|
|||
def home(self):
|
||||
self.location(self.homep)
|
||||
|
||||
def is_logged(self):
|
||||
def is_logged(self):
|
||||
if self.is_on_page(LoginPage) or self.is_on_page(TimeoutPage):
|
||||
return False
|
||||
return True
|
||||
|
||||
|
||||
def login(self):
|
||||
assert isinstance(self.username, basestring)
|
||||
assert isinstance(self.password, basestring)
|
||||
|
|
|
|||
|
|
@ -23,7 +23,7 @@ import subprocess
|
|||
import tempfile
|
||||
import shutil
|
||||
|
||||
from datetime import datetime, date
|
||||
from datetime import date
|
||||
from decimal import Decimal
|
||||
|
||||
from weboob.tools.browser import BasePage
|
||||
|
|
@ -60,14 +60,14 @@ class HistoryPage(BasePage):
|
|||
|
||||
def _create_bill(self, date, price, link):
|
||||
bill = Bill()
|
||||
bill.id = date.__str__().replace('-', '')
|
||||
bill.id = date.__str__().replace('-', '')
|
||||
bill.date = date
|
||||
bill._price = price
|
||||
bill._url = link
|
||||
bill.format = u'pdf'
|
||||
bill.label = unicode(price)
|
||||
return bill
|
||||
|
||||
|
||||
def get_details(self):
|
||||
return self.details
|
||||
|
||||
|
|
@ -100,10 +100,8 @@ class PdfPage():
|
|||
footnote = re.compile(r'\([0-9]\) ') # (f)
|
||||
ht = re.compile('HT par mois')
|
||||
base = re.compile('la base de')
|
||||
begindate = re.compile(' \d\d\/\d\d ') # MM/DD
|
||||
enddate = re.compile('\d\d\/\d\d\/\d\d') # YY/MM/DD
|
||||
endwithdigit = re.compile('\d+$') # blah blah 42
|
||||
endwitheuro = re.compile('€$') # blah 00,00 €
|
||||
textwithcoma = re.compile('([a-z]|\d{4})\,') # blah 2012, blah blah
|
||||
|
||||
# Parsing
|
||||
|
|
|
|||
|
|
@ -17,10 +17,9 @@
|
|||
# You should have received a copy of the GNU Affero General Public License
|
||||
# along with weboob. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
from datetime import datetime, date
|
||||
from datetime import date
|
||||
|
||||
from weboob.tools.browser import BasePage
|
||||
from weboob.tools.mech import ClientForm
|
||||
from weboob.capabilities.bill import Subscription
|
||||
|
||||
__all__ = ['LoginPage', 'HomePage', 'AccountPage', 'TimeoutPage']
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue