Fix dispatcher logging (#33299)

This commit is contained in:
Paulus Schoutsen authored and GitHub committed 2020-03-26 20:44:44 -07:00
1 parent 6cafc45d2b
commit 73c52e668e
2 files changed
+11 -3

No files matched your search

+4 -1
View File
@@ -47,7 +47,10 @@ def async_dispatcher_connect(
wrapped_target = catch_log_exception(
target,
lambda *args: "Exception in {} when dispatching '{}': {}".format(
target.__name__, signal, args
# Functions wrapped in partial do not have a __name__
getattr(target, "__name__", None) or str(target),
signal,
args,
),
)