Skip to content

Commit

Permalink
Fixed paths
Browse files Browse the repository at this point in the history
  • Loading branch information
kthoden committed Feb 28, 2020
1 parent d55cf05 commit fd3b4ac
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions src/imxml2django.py
Original file line number Diff line number Diff line change
@@ -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
Expand Down Expand Up @@ -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")
Expand Down

0 comments on commit fd3b4ac

Please sign in to comment.