1
0
mirror of https://github.com/ciromattia/kcc synced 2025-12-13 01:36:27 +00:00

make error message more clear for covers (#938)

* add error reporting to cover

* fix period
This commit is contained in:
Alex Xu
2025-05-25 17:02:14 -07:00
committed by GitHub
parent 8da2b4cb96
commit ebb59dbc2d

View File

@@ -513,8 +513,11 @@ def buildEPUB(path, chapternames, tomenumber, ischunked):
dirnames, filenames = walkSort(dirnames, filenames)
for afile in filenames:
if cover is None:
cover = os.path.join(os.path.join(path, 'OEBPS', 'Images'),
'cover' + getImageFileName(afile)[1])
try:
cover = os.path.join(os.path.join(path, 'OEBPS', 'Images'),
'cover' + getImageFileName(afile)[1])
except Exception as e:
raise UserWarning(f"{afile}: {e}")
options.covers.append((image.Cover(os.path.join(dirpath, afile), cover, options,
tomenumber), options.uuid))
if not chapter: