File tree Expand file tree Collapse file tree 1 file changed +4
-4
lines changed
Expand file tree Collapse file tree 1 file changed +4
-4
lines changed Original file line number Diff line number Diff line change @@ -271,13 +271,13 @@ def initialize_plugs(
271271 raise base_plugs .InvalidPlugError (
272272 'Plug type "{}" is not an instance of base_plugs.BasePlug' .format (
273273 plug_type ))
274- if plug_type .logger != _BASE_PLUGS_LOG :
275- # They put a logger attribute on the class itself, overriding ours.
276- raise base_plugs .InvalidPlugError (
277- 'Do not override "logger" in your plugs.' , plug_type )
278274
279275 # The following method of swapping out loggers is not thread-safe, so it is wrapped in a lock.
280276 with plug_type .init_lock :
277+ if plug_type .logger != _BASE_PLUGS_LOG :
278+ # They put a logger attribute on the class itself, overriding ours.
279+ raise base_plugs .InvalidPlugError (
280+ 'Do not override "logger" in your plugs.' , plug_type )
281281 # Override the logger so that __init__'s logging goes into the record.
282282 plug_type .logger = plug_logger
283283 try :
You can’t perform that action at this time.
0 commit comments