From b5f5ba69d264a41fac61876c4baba4b60b165733 Mon Sep 17 00:00:00 2001 From: Jarrod Johnson Date: Tue, 31 May 2022 10:18:42 -0400 Subject: [PATCH] Fix python 3.9 compatibility Python 3.9 renamed an attribute on a threading object, try both names to support old and new python --- confluent_server/confluent/config/configmanager.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/confluent_server/confluent/config/configmanager.py b/confluent_server/confluent/config/configmanager.py index e88e9483..8ba05c2e 100644 --- a/confluent_server/confluent/config/configmanager.py +++ b/confluent_server/confluent/config/configmanager.py @@ -2548,8 +2548,12 @@ class ConfigManager(object): if statelessmode: return with cls._syncstate: + try: + isalive = cls._cfgwriter.isAlive() + except AttributeError: + isalive = cls._cfgwriter.is_alive() if (cls._syncrunning and cls._cfgwriter is not None and - cls._cfgwriter.isAlive()): + isalive): cls._writepending = True return if cls._syncrunning: # This suggests an unclean write attempt,