From a9b14bf67e225a176167eff53aed35a7c46f03eb Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fr=C3=A9d=C3=A9ric=20P=C3=A9ters?= Date: Fri, 25 Oct 2019 00:37:47 +0200 Subject: [PATCH] doc-publik: update redmine doc conversion for python 3 --- doc-publik/update-publik-doc-from-redmine.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/doc-publik/update-publik-doc-from-redmine.py b/doc-publik/update-publik-doc-from-redmine.py index 453989e..53c68bb 100644 --- a/doc-publik/update-publik-doc-from-redmine.py +++ b/doc-publik/update-publik-doc-from-redmine.py @@ -20,12 +20,12 @@ for cell in TextCell.objects.filter(slug__in=DOCS.keys(), page__snapshot__isnull continue document = BeautifulSoup(resp.content, 'html5lib') content = document.find('body') - new_content = unicode(content).replace('', '').replace('', '') + new_content = content.decode().replace('', '').replace('', '') cell.text = new_content cell.order = 1 cell.save() - url = DOCS[cell.slug].replace('.html', '').decode('utf-8') + url = DOCS[cell.slug].replace('.html', '') cell, created = TextCell.objects.get_or_create( page=cell.page, slug='editor-warning', defaults={'order': 0})