Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix formatting as per pep8 in thread_pool.py #891

Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
4 changes: 2 additions & 2 deletions minio/thread_pool.py
Expand Up @@ -45,7 +45,7 @@ def run(self):
""" Continously receive tasks and execute them """
while True:
task = self.tasks_queue.get()
if task is None:
if not task:
self.tasks_queue.task_done()
break
# No exception detected in any thread,
Expand All @@ -61,6 +61,7 @@ def run(self):
# Mark this task as done, whether an exception happened or not
self.tasks_queue.task_done()


class ThreadPool:
""" Pool of threads consuming tasks from a queue """

Expand Down Expand Up @@ -91,4 +92,3 @@ def result(self):
if not self.exceptions_queue.empty():
raise self.exceptions_queue.get()
return self.results_queue