mirror of
https://github.com/ciromattia/kcc
synced 2026-10-19 07:52:33 +00:00
Error handling tweak
This commit is contained in:
+1
-1
@@ -608,7 +608,7 @@ def getWorkFolder(afile):
|
|||||||
raise UserWarning("Failed to extract file.")
|
raise UserWarning("Failed to extract file.")
|
||||||
else:
|
else:
|
||||||
rmtree(workdir, True)
|
rmtree(workdir, True)
|
||||||
raise TypeError
|
raise TypeError("Failed to detect archive format.")
|
||||||
if len(os.path.join(path, 'OEBPS', 'Images')) > 240:
|
if len(os.path.join(path, 'OEBPS', 'Images')) > 240:
|
||||||
raise UserWarning("Path is too long.")
|
raise UserWarning("Path is too long.")
|
||||||
move(path, path + "_temp")
|
move(path, path + "_temp")
|
||||||
|
|||||||
Reference in New Issue
Block a user