fixing using new account page version when we are already on old account page

This commit is contained in:
Vincent Paredes 2014-11-04 14:21:53 +01:00 committed by Romain Bignon
commit b9d3e87fda

View file

@ -81,7 +81,8 @@ class Paypal(Browser):
def get_accounts(self): def get_accounts(self):
self.find_website_version() self.find_website_version()
if self.website == "old" and not self.is_on_page(AccountPage): if self.website == "old":
if not self.is_on_page(AccountPage):
self.location('/en/cgi-bin/webscr?cmd=_account&nav=0.0') self.location('/en/cgi-bin/webscr?cmd=_account&nav=0.0')
elif not self.is_on_page(NewAccountPage): elif not self.is_on_page(NewAccountPage):
self.location('/businessexp/money') self.location('/businessexp/money')
@ -89,7 +90,8 @@ class Paypal(Browser):
return self.page.get_accounts() return self.page.get_accounts()
def get_account(self, _id): def get_account(self, _id):
if self.website == "old" and not not self.is_on_page(AccountPage): if self.website == "old":
if not self.is_on_page(AccountPage):
self.location('/en/cgi-bin/webscr?cmd=_account&nav=0.0') self.location('/en/cgi-bin/webscr?cmd=_account&nav=0.0')
elif not self.is_on_page(NewAccountPage): elif not self.is_on_page(NewAccountPage):
self.location('/businessexp/money') self.location('/businessexp/money')