[weboob] [PATCH 1/6] [cragr] fix conversion warning

Kitof git at kitof.net
Mon Jul 22 16:11:24 CEST 2013


From: Christophe Lampin <weboob at lampin.net>


Signed-off-by: Christophe Lampin <weboob at lampin.net>
---
 modules/cragr/web/pages.py | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/modules/cragr/web/pages.py b/modules/cragr/web/pages.py
index 2390625..5ae3c21 100644
--- a/modules/cragr/web/pages.py
+++ b/modules/cragr/web/pages.py
@@ -186,7 +186,7 @@ class TransactionsPage(BasePage):
 
             sub_label = col_text.find('br').tail
             if sub_label is not None and (len(t.label) < 3 or t.label == t.category or len(re.findall('[^\w\s]', sub_label))/float(len(sub_label)) < len(re.findall('\d', t.label))/float(len(t.label))):
-                t.label = sub_label.strip()
+                t.label = unicode(sub_label.strip())
             # Sometimes, the category contains the label, even if there is another line with it again.
             t.category = re.sub('(.*)  .*', r'\1', t.category).strip()
 
-- 
1.8.1.4




More information about the weboob mailing list