summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorFrédéric Péters <fpeters@entrouvert.com>2019-10-24 22:37:47 (GMT)
committerFrédéric Péters <fpeters@entrouvert.com>2019-10-24 22:37:47 (GMT)
commita9b14bf67e225a176167eff53aed35a7c46f03eb (patch)
tree0e63dba977cc9c58906559185f6ffb1f088ecf98
parent3cef70bcb2f8f7b3c003dada6c65f477aa1339e1 (diff)
downloadmisc-fred-a9b14bf67e225a176167eff53aed35a7c46f03eb.zip
misc-fred-a9b14bf67e225a176167eff53aed35a7c46f03eb.tar.gz
misc-fred-a9b14bf67e225a176167eff53aed35a7c46f03eb.tar.bz2
doc-publik: update redmine doc conversion for python 3
-rw-r--r--doc-publik/update-publik-doc-from-redmine.py4
1 files 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('<body>', '').replace('</body>', '')
+ new_content = content.decode().replace('<body>', '').replace('</body>', '')
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})