From 1034f73479bed86f069c5411de13a7de92249177 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Rapha=C3=ABl=20Vinot?= Date: Wed, 24 Aug 2016 10:01:44 +0200 Subject: [PATCH] Fix python 3.3 and 3.4 --- misp_modules/__init__.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/misp_modules/__init__.py b/misp_modules/__init__.py index fd0d740..81c92b1 100644 --- a/misp_modules/__init__.py +++ b/misp_modules/__init__.py @@ -170,7 +170,11 @@ class ListModules(tornado.web.RequestHandler): class QueryModule(tornado.web.RequestHandler): - executor = ThreadPoolExecutor(None) + try: + # Python 3.5, use as many threads as possible + executor = ThreadPoolExecutor() + except: + executor = ThreadPoolExecutor(5) @run_on_executor def run_request(self, jsonpayload):