From d094a227b33e6bbf67a305f070c531262a121897 Mon Sep 17 00:00:00 2001 From: kthoden Date: Fri, 23 Apr 2021 09:59:10 +0200 Subject: [PATCH] Fix DOI assignment code --- src/imxml2epub.py | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/src/imxml2epub.py b/src/imxml2epub.py index 1fbf556..97da7e9 100755 --- a/src/imxml2epub.py +++ b/src/imxml2epub.py @@ -1,6 +1,6 @@ #!/usr/bin/env python3 # -*- coding: utf-8; mode: python -*- -# Time-stamp: <2021-03-08 11:04:15 (kthoden)> +# Time-stamp: <2021-04-23 09:58:44 (kthoden)> """ Convert a customized DocBook XML file into a set of files that constitute the contents of an EPUB file. @@ -554,8 +554,10 @@ def add_css_snippet(css_snippet, css_file): publication_isbn = cfgPublication.get("Technical", "ISBN-epub") except: publication_isbn = cfgPublication.get("Technical", "ISBN") - -publication_doi = cfgPublication.get("Technical", "DOI") or None +try: + publication_doi = cfgPublication.get("Technical", "DOI") +except: + publication_doi = "missing" # Prepare Author String strAuthorString = cfgPublication.get("Authors", "Author1")