File tree Expand file tree Collapse file tree 6 files changed +52
-714
lines changed
integration/backward_compatible/serialization Expand file tree Collapse file tree 6 files changed +52
-714
lines changed Original file line number Diff line number Diff line change @@ -187,7 +187,7 @@ def add_entry_listener(
187187 LOADED = loaded_func ,
188188 )
189189
190- if key is not None and predicate :
190+ if key is not None and predicate is not None :
191191 try :
192192 key_data = self ._to_data (key )
193193 predicate_data = self ._to_data (predicate )
@@ -215,7 +215,7 @@ def add_entry_listener(
215215 )
216216 response_decoder = with_key_and_predicate_codec .decode_response
217217 event_message_handler = with_key_and_predicate_codec .handle
218- elif key is not None and not predicate :
218+ elif key is not None and predicate is None :
219219 try :
220220 key_data = self ._to_data (key )
221221 except SchemaNotReplicatedError as e :
@@ -242,7 +242,7 @@ def add_entry_listener(
242242 )
243243 response_decoder = with_key_codec .decode_response
244244 event_message_handler = with_key_codec .handle
245- elif key is None and predicate :
245+ elif key is None and predicate is not None :
246246 try :
247247 predicate = self ._to_data (predicate )
248248 except SchemaNotReplicatedError as e :
Original file line number Diff line number Diff line change @@ -78,7 +78,7 @@ def add_entry_listener(
7878 Returns:
7979 A registration id which is used as a key to remove the listener.
8080 """
81- if key is not None and predicate :
81+ if key is not None and predicate is not None :
8282 try :
8383 key_data = self ._to_data (key )
8484 predicate_data = self ._to_data (predicate )
@@ -103,7 +103,7 @@ def add_entry_listener(
103103 )
104104 response_decoder = with_key_and_predicate_codec .decode_response
105105 event_message_handler = with_key_and_predicate_codec .handle
106- elif key is not None and not predicate :
106+ elif key is not None and predicate is None :
107107 try :
108108 key_data = self ._to_data (key )
109109 except SchemaNotReplicatedError as e :
@@ -123,7 +123,7 @@ def add_entry_listener(
123123 request = with_key_codec .encode_request (self .name , key_data , self ._is_smart )
124124 response_decoder = with_key_codec .decode_response
125125 event_message_handler = with_key_codec .handle
126- elif key is None and predicate :
126+ elif key is None and predicate is not None :
127127 try :
128128 predicate = self ._to_data (predicate )
129129 except SchemaNotReplicatedError as e :
You can’t perform that action at this time.
0 commit comments