Skip to content

Commit 514dae9

Browse files
committed
Merge branch 'release/1.2.2'
2 parents c87a47c + d85190a commit 514dae9

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

pyproject.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[tool.poetry]
22
name = "taskiq-dependencies"
3-
version = "1.2.1"
3+
version = "1.2.2"
44
description = "FastAPI like dependency injection implementation"
55
authors = ["Pavel Kirilin <win10@list.ru>"]
66
readme = "README.md"

taskiq_dependencies/ctx.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -133,7 +133,7 @@ def close(self, *args: Any) -> None: # noqa: C901
133133
:param args: exception info if any.
134134
"""
135135
exception_found = False
136-
if args[1] is not None and self.propagate_excs:
136+
if self.propagate_excs and len(args) > 1 and args[1] is not None:
137137
exception_found = True
138138
for ctx in self.sub_contexts:
139139
ctx.close(*args)
@@ -234,7 +234,7 @@ async def close(self, *args: Any) -> None: # noqa: C901
234234
:param args: exception info if any.
235235
"""
236236
exception_found = False
237-
if args[1] is not None and self.propagate_excs:
237+
if self.propagate_excs and len(args) > 1 and args[1] is not None:
238238
exception_found = True
239239
for ctx in self.sub_contexts:
240240
await ctx.close(*args) # type: ignore

0 commit comments

Comments
 (0)