From 083d58a5d92a2471973e7cc5cdeac6af34e47612 Mon Sep 17 00:00:00 2001 From: Clinton Hall Date: Fri, 1 Mar 2013 04:32:04 -0800 Subject: [PATCH] Keep it simple ;) Just define the extract commands as a list, then add the filePath and finally call it. --- extractor/extractor.py | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/extractor/extractor.py b/extractor/extractor.py index c4650f64..4f4786dc 100644 --- a/extractor/extractor.py +++ b/extractor/extractor.py @@ -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: