From 9aed1c29f51909cdbab9ceba1d20fc9a6fc494fd Mon Sep 17 00:00:00 2001 From: Nika Gerson Lohman Date: Tue, 4 Dec 2018 11:52:06 +0100 Subject: [PATCH] Update extractor.py for correct return code --- core/extractor/extractor.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/core/extractor/extractor.py b/core/extractor/extractor.py index 6cad7384..8764bff4 100644 --- a/core/extractor/extractor.py +++ b/core/extractor/extractor.py @@ -122,7 +122,7 @@ def extract(filePath, outputDestination): cmd2.append("-p-") # don't prompt for password. p = Popen(cmd2, stdout=devnull, stderr=devnull, startupinfo=info) # should extract files fine. res = p.wait() - if (res >= 0 and os.name == 'nt') or res == 0: # for windows chp returns process id if successful or -1*Error code. Linux returns 0 for successful. + if res == 0: # Both Linux and Windows return 0 for successful. core.logger.info("EXTRACTOR: Extraction was successful for {file} to {destination}".format (file=filePath, destination=outputDestination)) success = 1