mirror of
https://github.com/ciromattia/kcc
synced 2025-12-23 06:31:54 +00:00
Expanded output of corruption error (close #272)
This commit is contained in:
@@ -869,7 +869,7 @@ def detectCorruption(tmppath, orgpath):
|
|||||||
if 'decoder' in str(err) and 'not available' in str(err):
|
if 'decoder' in str(err) and 'not available' in str(err):
|
||||||
raise RuntimeError('Pillow was compiled without JPG and/or PNG decoder.')
|
raise RuntimeError('Pillow was compiled without JPG and/or PNG decoder.')
|
||||||
else:
|
else:
|
||||||
raise RuntimeError('Image file %s is corrupted.' % pathOrg)
|
raise RuntimeError('Image file %s is corrupted. Error: %s' % (pathOrg, str(err)))
|
||||||
else:
|
else:
|
||||||
os.remove(os.path.join(root, name))
|
os.remove(os.path.join(root, name))
|
||||||
if alreadyProcessed:
|
if alreadyProcessed:
|
||||||
|
|||||||
Reference in New Issue
Block a user