mirror of
https://github.com/ciromattia/kcc
synced 2025-12-15 18:56:28 +00:00
Gracefully exit if unrar missing (#15)
This commit is contained in:
@@ -399,7 +399,11 @@ def getWorkFolder(afile):
|
|||||||
else:
|
else:
|
||||||
cbx = cbxarchive.CBxArchive(afile)
|
cbx = cbxarchive.CBxArchive(afile)
|
||||||
if cbx.isCbxFile():
|
if cbx.isCbxFile():
|
||||||
path = cbx.extract(workdir)
|
try:
|
||||||
|
path = cbx.extract(workdir)
|
||||||
|
except OSError:
|
||||||
|
print 'Unrar not found, please download from http://www.rarlab.com/download.htm and put into your PATH.'
|
||||||
|
sys.exit(21)
|
||||||
else:
|
else:
|
||||||
raise TypeError
|
raise TypeError
|
||||||
move(path, path + "_temp")
|
move(path, path + "_temp")
|
||||||
|
|||||||
Reference in New Issue
Block a user