[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): class HistoryDetailsPage(Page):
def get_converted_amount(self, account): def get_converted_amount(self, account):
convert_td = self.document.xpath('//td[contains(text(),"' + account.currency + ')")]')[0].text find_td = self.document.xpath('//td[contains(text(),"' + account.currency + ')")]')
m = re.match('.* ([^ ]+) ' + account.currency + '\).*', convert_td) if len(find_td) > 0 :
if m: convert_td = find_td[0].text
return m.group(1) m = re.match('.* ([^ ]+) ' + account.currency + '\).*', convert_td)
else: if m:
return False return m.group(1)
return False