From af19e98ce8a778083b281276c64d666036b061aa Mon Sep 17 00:00:00 2001 From: Jarrod Johnson Date: Wed, 8 Jun 2022 11:03:56 -0400 Subject: [PATCH] Remove use of eventlet in client side The client side does not use eventlet, so allow fallback to the normal socket and select to keep the client module whole in the face of that missing. --- confluent_client/confluent/tlvdata.py | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/confluent_client/confluent/tlvdata.py b/confluent_client/confluent/tlvdata.py index e0d3d9f4..7fcb663b 100644 --- a/confluent_client/confluent/tlvdata.py +++ b/confluent_client/confluent/tlvdata.py @@ -19,8 +19,12 @@ import array import ctypes import ctypes.util import confluent.tlv as tlv -import eventlet.green.socket as socket -import eventlet.green.select as select +try: + import eventlet.green.socket as socket + import eventlet.green.select as select +except ImportError: + import socket + import select from datetime import datetime import json import os