Keep it simple ;)

Just define the extract commands as a list, then add the filePath and finally call it.
This commit is contained in:
Clinton Hall 2013-03-01 04:32:04 -08:00
parent 356b2059d9
commit 083d58a5d9

View file

@ -118,9 +118,8 @@ def extract(dirpath, file, outputDestination):
Logger.error("EXTRACTOR: Extraction failed for %s. Could not call command %s", filePath, run)
else:
try:
x = len(cmd)
cmd[x] = filePath # add filePath to final cmd arg
res = call(cmd) #
cmd.append(filePath) # add filePath to final cmd arg.
res = call(cmd) # should extract files fine.
if res == 0:
Logger.info("EXTRACTOR: Extraction was successful for %s to %s", filePath, outputDestination)
else: