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

Expanded output of corruption error (close #272)

This commit is contained in:
Paweł Jastrzębski
2018-07-10 08:41:57 +02:00
parent 7904662f25
commit 93e6b51466

View File

@@ -869,7 +869,7 @@ def detectCorruption(tmppath, orgpath):
if 'decoder' in str(err) and 'not available' in str(err):
raise RuntimeError('Pillow was compiled without JPG and/or PNG decoder.')
else:
raise RuntimeError('Image file %s is corrupted.' % pathOrg)
raise RuntimeError('Image file %s is corrupted. Error: %s' % (pathOrg, str(err)))
else:
os.remove(os.path.join(root, name))
if alreadyProcessed: