From fd3b4ac3e1f391319b2facf20bc106cb480f1857 Mon Sep 17 00:00:00 2001 From: kthoden Date: Fri, 28 Feb 2020 17:35:18 +0100 Subject: [PATCH] Fixed paths --- src/imxml2django.py | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/src/imxml2django.py b/src/imxml2django.py index 27ba965..040fd55 100755 --- a/src/imxml2django.py +++ b/src/imxml2django.py @@ -1,6 +1,6 @@ #!/usr/bin/env python3 # -*- coding: utf-8; mode: python -*- -# Time-stamp: <2020-02-28 16:59:46 (kthoden)> +# Time-stamp: <2020-02-28 17:32:23 (kthoden)> """ Create an XML file that can be inserted into the Django database @@ -137,9 +137,8 @@ else: logging.error(f"Found no publication.cfg in {INPUT_DIR}. Exiting") sys.exit( 1 ) -logging.info(f"The file Cover.jpg in django directory is missing.") -if os.path.exists(PUBLICATION_DIR / "Cover.jpg"): - shutil.copy(PUBLICATION_DIR / "Cover.jpg", OUTPUT_DIR / "Cover.jpg") +if os.path.exists(INPUT_DIR / "Cover.jpg"): + shutil.copy(INPUT_DIR / "Cover.jpg", OUTPUT_DIR / "Cover.jpg") logging.info("Copied from current directory.") else: logging.error("No coverfile found. You can create a temporary one with the mkimage.py script")