From 83acdab2167ec8752b9f162d69027833e211d1ba Mon Sep 17 00:00:00 2001 From: Jarrod Johnson Date: Tue, 31 May 2022 11:23:27 -0400 Subject: [PATCH] Amend python 3.9 compatibility fix Avoid checking None for is_alive or isAlive --- confluent_server/confluent/config/configmanager.py | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/confluent_server/confluent/config/configmanager.py b/confluent_server/confluent/config/configmanager.py index 8ba05c2e..2ccce28b 100644 --- a/confluent_server/confluent/config/configmanager.py +++ b/confluent_server/confluent/config/configmanager.py @@ -2548,12 +2548,13 @@ 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 - isalive): + isalive = False + if cls._cfgwriter is not None: + try: + isalive = cls._cfgwriter.isAlive() + except AttributeError: + isalive = cls._cfgwriter.is_alive() + if (cls._syncrunning and isalive): cls._writepending = True return if cls._syncrunning: # This suggests an unclean write attempt,