[paypal] Fix #1747

This commit is contained in:
Kitof 2015-03-04 22:20:34 +01:00
commit f9e92b76fa

View file

@ -371,9 +371,10 @@ class HistoryPage(Page):
class HistoryDetailsPage(Page):
def get_converted_amount(self, account):
convert_td = self.document.xpath('//td[contains(text(),"' + account.currency + ')")]')[0].text
m = re.match('.* ([^ ]+) ' + account.currency + '\).*', convert_td)
if m:
return m.group(1)
else:
return False
find_td = self.document.xpath('//td[contains(text(),"' + account.currency + ')")]')
if len(find_td) > 0 :
convert_td = find_td[0].text
m = re.match('.* ([^ ]+) ' + account.currency + '\).*', convert_td)
if m:
return m.group(1)
return False