change the call method and add succesCodes. fixes #185

This commit is contained in:
clinton-hall 2013-11-09 10:03:12 +10:30
commit 80a0a6f28d
3 changed files with 14 additions and 4 deletions

View file

@ -119,7 +119,7 @@ def extract(filePath, outputDestination):
cmd.append(filePath) # add filePath to final cmd arg.
p = Popen(cmd) # should extract files fine.
res = p.wait()
if res >= 0: # for windows chp returns process id if successful or -1*Error code. Linus returns 0 for successful.
if res >= 0: # for windows chp returns process id if successful or -1*Error code. Linux returns 0 for successful.
Logger.info("EXTRACTOR: Extraction was successful for %s to %s", filePath, outputDestination)
else:
Logger.error("EXTRACTOR: Extraction failed for %s. 7zip result was %s", filePath, res)