Skip to content

Commit

Permalink
Restructure as per review comment
Browse files Browse the repository at this point in the history
  • Loading branch information
provinzkraut committed Jun 23, 2024
1 parent ccc0060 commit 6daf85e
Showing 1 changed file with 9 additions and 2 deletions.
11 changes: 9 additions & 2 deletions Lib/logging/config.py
Original file line number Diff line number Diff line change
Expand Up @@ -804,8 +804,15 @@ def configure_handler(self, config):
# if it's not an instance of BaseProxy, it also can't be
# an instance of Manager.Queue / Manager.JoinableQueue
if isinstance(qspec, BaseProxy):
proxy_queue = MM().Queue()
proxy_joinable_queue = MM().JoinableQueue()
# Sometimes manager or queue creation might fail
# (e.g. see issue gh-120868). In that case, any
# exception during the creation of these queues will
# propagate up to the caller and be wrapped in a
# `ValueError`, whose cause will indicate the details of
# the failure.
mm = MM()
proxy_queue = mm.Queue()
proxy_joinable_queue = mm.JoinableQueue()
if not isinstance(qspec, (type(proxy_queue), type(proxy_joinable_queue))):
raise TypeError('Invalid queue specifier %r' % qspec)
else:
Expand Down

0 comments on commit 6daf85e

Please sign in to comment.