diff --git a/sdks/python/apache_beam/utils/thread_pool_executor.py b/sdks/python/apache_beam/utils/thread_pool_executor.py index 2b5c494666725..a5443ed5c4b2b 100644 --- a/sdks/python/apache_beam/utils/thread_pool_executor.py +++ b/sdks/python/apache_beam/utils/thread_pool_executor.py @@ -109,7 +109,7 @@ def submit(self, fn, *args, **kwargs): self._idle_worker_queue.get(block=False).assign_work(work_item) # If we have more idle threads then the max allowed, shutdown a thread. - if (self._idle_worker_queue.qsize() > self._max_idle_threads): + if self._idle_worker_queue.qsize() > self._max_idle_threads: try: self._idle_worker_queue.get(block=False).shutdown() except queue.Empty: