display an error message when user IP address is localized outside of France (closes #1327)
This commit is contained in:
parent
d2b9a0a2d2
commit
17c2a74707
2 changed files with 8 additions and 2 deletions
|
|
@ -28,9 +28,14 @@ from weboob.tools.mech import ClientForm
|
|||
from weboob.capabilities.base import UserError, Currency
|
||||
|
||||
|
||||
__all__ = ['CitiesPage', 'SearchPage']
|
||||
__all__ = ['CitiesPage', 'SearchPage', 'SearchErrorPage', 'SearchInProgressPage',
|
||||
'ResultsPage', 'ForeignPage']
|
||||
|
||||
|
||||
class ForeignPage(BasePage):
|
||||
def on_loaded(self):
|
||||
raise UserError('Your IP address is localized in a country not supported by this module (%s). Currently only the French website is supported.' % self.group_dict['country'])
|
||||
|
||||
class CitiesPage(BasePage):
|
||||
def get_stations(self):
|
||||
result = json.loads(self.document[self.document.find('{'):-2])
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue