diff --git a/excalibur/executors/celery_executor.py b/excalibur/executors/celery_executor.py index bb26429..d111ee2 100755 --- a/excalibur/executors/celery_executor.py +++ b/excalibur/executors/celery_executor.py @@ -1,5 +1,6 @@ import traceback import subprocess +import sys from celery import Celery @@ -22,7 +23,7 @@ @app.task def execute_command(command): try: - subprocess.check_call(command, stderr=subprocess.STDOUT, close_fds=True) + subprocess.check_call(command, stderr=subprocess.STDOUT, close_fds=(sys.platform != 'win32')) except Exception as e: traceback.print_exc(e) diff --git a/excalibur/executors/sequential_executor.py b/excalibur/executors/sequential_executor.py index cc5c45a..4e758c2 100644 --- a/excalibur/executors/sequential_executor.py +++ b/excalibur/executors/sequential_executor.py @@ -1,13 +1,14 @@ import traceback import subprocess from concurrent.futures import ProcessPoolExecutor +import sys from .base_executor import BaseExecutor def execute_command(command): try: - subprocess.check_call(command, stderr=subprocess.STDOUT, close_fds=True) + subprocess.check_call(command, stderr=subprocess.STDOUT, close_fds=(sys.platform != 'win32')) except FileNotFoundError: # TODO: PyInstaller does not package console_scripts # https://github.com/pyinstaller/pyinstaller/issues/305