Skip to content

Commit

Permalink
fix: None does not implement middleware when there are no middlewares
Browse files Browse the repository at this point in the history
  • Loading branch information
Nek0trkstr committed Apr 19, 2023
1 parent d01c96f commit 90a8f9c
Showing 1 changed file with 3 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -245,6 +245,9 @@ def __init__(self, *args, **kwargs):

# inject trace middleware
self._middlewares_list = kwargs.pop("middleware", [])
if self._middlewares_list is None:
self._middlewares_list = []

tracer_provider = otel_opts.pop("tracer_provider", None)
meter_provider = otel_opts.pop("meter_provider", None)
if not isinstance(self._middlewares_list, (list, tuple)):
Expand Down

0 comments on commit 90a8f9c

Please sign in to comment.