0001-user_import-do-not-use-contextlib.nested-44356.patch
src/authentic2/manager/user_import.py | ||
---|---|---|
201 | 201 | |
202 | 202 |
@contextlib.contextmanager |
203 | 203 |
def publik_provisionning(): |
204 |
managers = [] |
|
205 | 204 |
if 'hobo.agent.authentic2' in settings.INSTALLED_APPS and not simulate: |
206 | 205 |
# provisionning is initialied in hobo.agent.authentic2.provisionning.apps |
207 | 206 |
from hobo.agent.authentic2.provisionning import provisionning as engine |
208 |
managers.append(engine) |
|
209 |
with contextlib.nested(*managers):
|
|
207 | ||
208 |
with engine:
|
|
210 | 209 |
yield None |
211 | 210 |
# prevent the provisionning thread from outliving the import thread |
212 | 211 |
engine.wait() |
213 |
- |