From 18c2455ec50eb0d90bee8e6c35e6f6b8c700261e Mon Sep 17 00:00:00 2001 From: Sebastian Lohff Date: Fri, 21 Jun 2024 15:37:27 +0200 Subject: [PATCH] Allow disabling eventlet.monkey_patch() via envvar To disable eventlet monkeypatching we can now set the environment variable DISABLE_EVENTLET_PATCHING to a value. This is done similarly in our asr1k driver. --- networking_aci/__init__.py | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/networking_aci/__init__.py b/networking_aci/__init__.py index f7f0240..cbf2f08 100644 --- a/networking_aci/__init__.py +++ b/networking_aci/__init__.py @@ -1,2 +1,5 @@ -import eventlet -eventlet.monkey_patch() +import os + +if not os.environ.get('DISABLE_EVENTLET_PATCHING'): + import eventlet + eventlet.monkey_patch()