Add valid Exception type to Except in ClusterPipeline by bssyousefi · Pull Request #3516 · redis/redis-py (original) (raw)

First, thank you for the repo.

In a recent change in ClusterPipeline, TimeoutError has been added to reinitialize the nodes.

redis-py/redis/cluster.py

Line 2188 in799716c

except (ConnectionError, TimeoutError):

However, it's a nested try-except and the upper except should also contain TimeoutError in order to respect cluster_error_retry_attempts.

redis-py/redis/cluster.py

Line 2115 in799716c

retry_attempts = self.cluster_error_retry_attempts