1
0
mirror of https://github.com/ciromattia/kcc synced 2025-12-13 09:46:25 +00:00

Gracefully exit if unrar missing (#15)

This commit is contained in:
Ciro Mattia Gonano
2013-03-07 11:21:17 +01:00
parent 6142c87fa3
commit 378aff4f35

View File

@@ -399,7 +399,11 @@ def getWorkFolder(afile):
else:
cbx = cbxarchive.CBxArchive(afile)
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:
raise TypeError
move(path, path + "_temp")