Skip to content

Commit

Permalink
Merge PR #503
Browse files Browse the repository at this point in the history
Since the refactoring 7af66b0 the Cheroot worker threads are named
like `('CP Server Thread-<id>',)`. A leftover comma transformed the
string to a tuple.

This patch fixes this by removing the trailing comma when setting the
thread name as `str`.

Ref:
* #503
* #516

Co-Authored-By: Carey Metcalfe <[email protected]>
Co-Authored-By: Christoph Heer <[email protected]>
  • Loading branch information
3 people committed Oct 1, 2022
2 parents 2404795 + 6b7c030 commit a41a557
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions cheroot/workers/threadpool.py
Original file line number Diff line number Diff line change
Expand Up @@ -178,7 +178,7 @@ def start(self):
for worker in self._threads:
worker.name = (
'CP Server {worker_name!s}'.
format(worker_name=worker.name),
format(worker_name=worker.name)
)
worker.start()
for worker in self._threads:
Expand Down Expand Up @@ -228,7 +228,7 @@ def _spawn_worker(self):
worker = WorkerThread(self.server)
worker.name = (
'CP Server {worker_name!s}'.
format(worker_name=worker.name),
format(worker_name=worker.name)
)
worker.start()
return worker
Expand Down

0 comments on commit a41a557

Please sign in to comment.