Error handling tweak
This commit is contained in:
1 parent
c33887b7b7
commit
5631391245
1 file changed
+1
-1
+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