Skip to content

Commit 4d87867

Browse files
fix: replace bare except clauses with except Exception
Bare `except:` catches BaseException including KeyboardInterrupt and SystemExit. Replaced 2 instances with `except Exception:`.
1 parent 889807d commit 4d87867

File tree

1 file changed

+2
-2
lines changed
  • python/semantic_kernel/agents/runtime/in_process

1 file changed

+2
-2
lines changed

python/semantic_kernel/agents/runtime/in_process/queue.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -132,7 +132,7 @@ async def put(self, item: T) -> None:
132132
self._putters.append(putter)
133133
try:
134134
await putter
135-
except:
135+
except Exception:
136136
putter.cancel() # Just in case putter is not done yet.
137137
try: # noqa: SIM105
138138
# Clean self._putters from canceled putters.
@@ -179,7 +179,7 @@ async def get(self) -> T:
179179
self._getters.append(getter)
180180
try:
181181
await getter
182-
except:
182+
except Exception:
183183
getter.cancel() # Just in case getter is not done yet.
184184
try: # noqa: SIM105
185185
# Clean self._getters from canceled getters.

0 commit comments

Comments
 (0)