Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion sdk/nexent/core/agents/core_agent.py
Original file line number Diff line number Diff line change
Expand Up @@ -399,7 +399,7 @@ def __call__(self, task: str, **kwargs):
try:
self.observer.add_message(
self.name, ProcessType.AGENT_FINISH, str(report))
except:
except Exception:
self.observer.add_message(self.name, ProcessType.AGENT_FINISH, "")

answer = Template(self.prompt_templates["managed_agent"]["report"], undefined=StrictUndefined).render({
Expand Down
12 changes: 6 additions & 6 deletions sdk/nexent/core/models/stt_model.py
Original file line number Diff line number Diff line change
Expand Up @@ -503,7 +503,7 @@ async def process_streaming_audio(self, ws_client, segment_size: int):
try:
await ws_client.send_json({"error": f"STT service error: {str(e)}"})
client_connected = False
except:
except Exception:
pass
break

Expand All @@ -515,7 +515,7 @@ async def process_streaming_audio(self, ws_client, segment_size: int):
try:
result_text = result['payload_msg']['result']['text'] if result['payload_msg']['result'][
'text'] else "empty"
except:
except Exception:
logger.error(f"Malformed result: {result}")
logger.info(f"Received response: {result_text}")

Expand Down Expand Up @@ -550,7 +550,7 @@ async def process_streaming_audio(self, ws_client, segment_size: int):
try:
await ws_client.send_json({"error": f"STT service connection closed unexpectedly: {e}"})
client_connected = False
except:
except Exception:
pass
break

Expand All @@ -572,7 +572,7 @@ async def process_streaming_audio(self, ws_client, segment_size: int):
if client_connected:
try:
await ws_client.send_json({"error": error_msg})
except:
except Exception:
logger.error("Cannot send error message: client disconnected")

except websockets.exceptions.WebSocketException as e:
Expand All @@ -581,7 +581,7 @@ async def process_streaming_audio(self, ws_client, segment_size: int):
if client_connected:
try:
await ws_client.send_json({"error": error_msg})
except:
except Exception:
logger.error("Cannot send error message: client disconnected")

except Exception as e:
Expand All @@ -592,7 +592,7 @@ async def process_streaming_audio(self, ws_client, segment_size: int):
if client_connected:
try:
await ws_client.send_json({"error": error_msg})
except:
except Exception:
logger.error("Cannot send error message: client disconnected")

finally:
Expand Down
4 changes: 2 additions & 2 deletions sdk/nexent/core/tools/terminal_tool.py
Original file line number Diff line number Diff line change
Expand Up @@ -173,7 +173,7 @@ def _is_session_alive(self, session: Dict[str, Any]) -> bool:
return True

return False
except:
except Exception:
return False

def _cleanup_session(self, session: Dict[str, Any]):
Expand All @@ -187,7 +187,7 @@ def _cleanup_session(self, session: Dict[str, Any]):
session["channel"].close()
if session and "client" in session:
session["client"].close()
except:
except Exception:
pass

def _clean_output(self, raw_output: str, command: str) -> str:
Expand Down
2 changes: 1 addition & 1 deletion sdk/nexent/core/utils/favicon_extractor.py
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ def check_favicon_exists(url):
try:
response = requests.head(url, timeout=3, allow_redirects=True)
return response.status_code == 200
except:
except Exception:
return False


Expand Down
8 changes: 4 additions & 4 deletions test/backend/services/test_mcp_container_service.py
Original file line number Diff line number Diff line change
Expand Up @@ -514,7 +514,7 @@ async def test_load_image_from_tar_file_success_with_tags(self, mock_manager):
# Clean up
try:
os.unlink(temp_file_path)
except:
except Exception:
pass

@pytest.mark.asyncio
Expand All @@ -540,7 +540,7 @@ async def test_load_image_from_tar_file_success_without_tags(self, mock_manager)
# Clean up
try:
os.unlink(temp_file_path)
except:
except Exception:
pass

@pytest.mark.asyncio
Expand All @@ -560,7 +560,7 @@ async def test_load_image_from_tar_file_empty_images(self, mock_manager):
# Clean up
try:
os.unlink(temp_file_path)
except:
except Exception:
pass

@pytest.mark.asyncio
Expand All @@ -581,7 +581,7 @@ async def test_load_image_from_tar_file_exception(self, mock_manager):
# Clean up
try:
os.unlink(temp_file_path)
except:
except Exception:
pass


Expand Down