From 4229b8ff85e1180ec991d4e6b1ea0807094f85a3 Mon Sep 17 00:00:00 2001 From: Aldo Bleeker Date: Mon, 5 Apr 2021 17:06:24 +0200 Subject: [PATCH] Another Python 3 fix --- DeDRM_plugin/flatxml2html.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/DeDRM_plugin/flatxml2html.py b/DeDRM_plugin/flatxml2html.py index 45e6949..2fe80c3 100644 --- a/DeDRM_plugin/flatxml2html.py +++ b/DeDRM_plugin/flatxml2html.py @@ -770,10 +770,10 @@ class DocParser(object): first_para_continued = False (pclass, pdesc) = self.getParaDescription(start,end, regtype) if not pclass: - if orig_regtype.endswith(b'.right') : pclass = 'cl-right' - elif orig_regtype.endswith(b'.center') : pclass = 'cl-center' - elif orig_regtype.endswith(b'.left') : pclass = 'cl-left' - elif orig_regtype.endswith(b'.justify') : pclass = 'cl-justify' + if orig_regtype.endswith(b'.right') : pclass = b'cl-right' + elif orig_regtype.endswith(b'.center') : pclass = b'cl-center' + elif orig_regtype.endswith(b'.left') : pclass = b'cl-left' + elif orig_regtype.endswith(b'.justify') : pclass = b'cl-justify' if pclass and (ptype == 'full') and (len(pclass) >= 6): tag = 'p' if pclass[3:6] == b'h1-' : tag = 'h4'