Add support for MP in Windows PyInstaller

This commit is contained in:
Daniel Goldberg 2019-09-09 11:36:28 +03:00
parent 10b2c2e6cb
commit 17dc764f37
1 changed files with 2 additions and 1 deletions

View File

@ -7,6 +7,7 @@ import logging.config
import os import os
import sys import sys
import traceback import traceback
from multiprocessing import freeze_support
import infection_monkey.utils as utils import infection_monkey.utils as utils
from infection_monkey.config import WormConfiguration, EXTERNAL_CONFIG_FILE from infection_monkey.config import WormConfiguration, EXTERNAL_CONFIG_FILE
@ -43,7 +44,7 @@ def main():
if 2 > len(sys.argv): if 2 > len(sys.argv):
return True return True
freeze_support() # required for multiprocessing + pyinstaller on windows
monkey_mode = sys.argv[1] monkey_mode = sys.argv[1]
if not (monkey_mode in [MONKEY_ARG, DROPPER_ARG]): if not (monkey_mode in [MONKEY_ARG, DROPPER_ARG]):