diff --git a/kcc/comic2ebook.py b/kcc/comic2ebook.py index 06a1c61..ce4cfa6 100755 --- a/kcc/comic2ebook.py +++ b/kcc/comic2ebook.py @@ -986,7 +986,7 @@ def detectCorruption(tmpPath, orgPath): imageSmaller += 1 except Exception as err: rmtree(os.path.join(tmpPath, '..', '..'), True) - if 'decoder' in err and 'not available' in err: + 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)