[PR #246] fix(legacy): replace bare except with except Exception in utils #245

Open
opened 2026-02-16 07:16:24 -05:00 by yindo · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/langchain-ai/open_deep_research/pull/246
Author: @llukito
Created: 2/15/2026
Status: 🔄 Open

Base: mainHead: fix/bare-except-legacy-utils


📝 Commits (1)

  • 5a94d27 fix(legacy): replace bare except with except Exception in utils

📊 Changes

1 file changed (+2 additions, -2 deletions)

View changed files

📝 src/legacy/utils.py (+2 -2)

📄 Description

Description

Replaced a bare except: clause with except Exception as e: in src/legacy/utils.py.

Why this matters:
Even in legacy code, bare excepts are problematic as they catch BaseException types like KeyboardInterrupt and SystemExit. This change ensures that users can still terminate long-running processes (like Deep Research agents) via standard signals like Ctrl+C, while maintaining the existing fallback logic for standard errors.


🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/langchain-ai/open_deep_research/pull/246 **Author:** [@llukito](https://github.com/llukito) **Created:** 2/15/2026 **Status:** 🔄 Open **Base:** `main` ← **Head:** `fix/bare-except-legacy-utils` --- ### 📝 Commits (1) - [`5a94d27`](https://github.com/langchain-ai/open_deep_research/commit/5a94d2760caebcb8d3c144793d1af32e99bad1bb) fix(legacy): replace bare except with except Exception in utils ### 📊 Changes **1 file changed** (+2 additions, -2 deletions) <details> <summary>View changed files</summary> 📝 `src/legacy/utils.py` (+2 -2) </details> ### 📄 Description ### Description Replaced a bare `except:` clause with `except Exception as e:` in `src/legacy/utils.py`. **Why this matters:** Even in legacy code, bare excepts are problematic as they catch `BaseException` types like `KeyboardInterrupt` and `SystemExit`. This change ensures that users can still terminate long-running processes (like Deep Research agents) via standard signals like `Ctrl+C`, while maintaining the existing fallback logic for standard errors. --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
yindo added the pull-request label 2026-02-16 07:16:24 -05:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: langchain-ai/open_deep_research#245