diff --git a/fingerprint_pro_server_api_sdk/api_client.py b/fingerprint_pro_server_api_sdk/api_client.py index c81ed6e0..59299b6b 100644 --- a/fingerprint_pro_server_api_sdk/api_client.py +++ b/fingerprint_pro_server_api_sdk/api_client.py @@ -68,7 +68,7 @@ def __init__(self, configuration=None, header_name=None, header_value=None, try: from multiprocessing.pool import ThreadPool self.pool = ThreadPool() - except ImportError: + except (ImportError, OSError): from fingerprint_pro_server_api_sdk.dummy_pool import DummyPool self.pool = DummyPool() else: diff --git a/template/api_client.mustache b/template/api_client.mustache index ee01247f..bea3475f 100644 --- a/template/api_client.mustache +++ b/template/api_client.mustache @@ -63,7 +63,7 @@ class ApiClient(object): try: from multiprocessing.pool import ThreadPool self.pool = ThreadPool() - except ImportError: + except (ImportError, OSError): from {{packageName}}.dummy_pool import DummyPool self.pool = DummyPool() else: