Skip to content

Commit

Permalink
fix: fix multiprocessing.pool detection fro Lambda
Browse files Browse the repository at this point in the history
  • Loading branch information
ilfa committed Aug 10, 2023
1 parent a02853d commit 9373a93
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion fingerprint_pro_server_api_sdk/api_client.py
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down
2 changes: 1 addition & 1 deletion template/api_client.mustache
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down

0 comments on commit 9373a93

Please sign in to comment.