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 scripts/generate_roster.py
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,7 @@ def fetch_github_api(url: str, token: str = None, count_only: bool = False) -> t
total_count += len(more_data)
if len(more_data) < per_page:
break
except:
except Exception:
break
break
except Exception as e:
Expand Down
2 changes: 1 addition & 1 deletion scripts/start_web.py
Original file line number Diff line number Diff line change
Expand Up @@ -467,7 +467,7 @@ def log_frontend_output():
if result == 0:
print_flush(f"✅ Backend is running on port {backend_port}!")
break
except:
except Exception:
pass

if backend.poll() is not None:
Expand Down
4 changes: 2 additions & 2 deletions src/agents/research/agents/reporting_agent.py
Original file line number Diff line number Diff line change
Expand Up @@ -573,7 +573,7 @@ def extract_citation_number(cit_id):
parts_list = cit_id.replace("CIT-", "").split("-")
if len(parts_list) == 2:
return (1, int(parts_list[0]), int(parts_list[1]))
except:
except Exception:
pass
return (999, 999, 999)

Expand Down Expand Up @@ -947,7 +947,7 @@ def extract_citation_number(cit_id):
parts_list = cit_id.replace("CIT-", "").split("-")
if len(parts_list) == 2:
return (1, int(parts_list[0]), int(parts_list[1]))
except:
except Exception:
pass
return (999, 999, 999)

Expand Down
6 changes: 3 additions & 3 deletions src/api/routers/knowledge.py
Original file line number Diff line number Diff line change
Expand Up @@ -700,7 +700,7 @@ async def websocket_progress(websocket: WebSocket, kb_name: str):
age_seconds = (now - progress_time).total_seconds()
if age_seconds < 300: # 5 minutes
should_send = True
except:
except Exception:
pass

if should_send:
Expand Down Expand Up @@ -738,13 +738,13 @@ async def websocket_progress(websocket: WebSocket, kb_name: str):
logger.debug(f"Progress WS error: {e}")
try:
await websocket.send_json({"type": "error", "message": str(e)})
except:
except Exception:
pass
finally:
await broadcaster.disconnect(kb_name, websocket)
try:
await websocket.close()
except:
except Exception:
pass


Expand Down
2 changes: 1 addition & 1 deletion src/api/utils/task_id_manager.py
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,7 @@ def cleanup_old_tasks(self, max_age_hours: int = 24):
finished_time = datetime.fromisoformat(finished_at)
if finished_time < cutoff:
to_remove.append(task_id)
except:
except Exception:
pass

for task_id in to_remove:
Expand Down
2 changes: 1 addition & 1 deletion src/knowledge/start_kb.py
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ def list_knowledge_bases():
print(
f" - RAG: {'Initialized' if stats.get('rag_initialized') else 'Not initialized'}"
)
except:
except Exception:
pass

print("=" * 60 + "\n")
Expand Down
4 changes: 2 additions & 2 deletions src/logging/adapters/lightrag.py
Original file line number Diff line number Diff line change
Expand Up @@ -123,7 +123,7 @@ def LightRAGLogContext(logger_name: Optional[str] = None, scene: Optional[str] =
debug_logger.debug(
f"Setting up LightRAG log forwarding (scene={scene}, logger_name={logger_name})"
)
except:
except Exception:
pass # Ignore if logger setup fails

# Determine logger name
Expand Down Expand Up @@ -174,7 +174,7 @@ def LightRAGLogContext(logger_name: Optional[str] = None, scene: Optional[str] =
try:
test_msg = "LightRAG log forwarding enabled"
lightrag_logger.info(test_msg)
except:
except Exception:
pass # Ignore test log errors

try:
Expand Down
4 changes: 2 additions & 2 deletions src/logging/logger.py
Original file line number Diff line number Diff line change
Expand Up @@ -458,7 +458,7 @@ def log_tool_call(
else str(tool_input)
)
self.debug(f"Tool Input: {input_str[:500]}...")
except:
except Exception:
pass
if tool_output is not None:
try:
Expand All @@ -468,7 +468,7 @@ def log_tool_call(
else str(tool_output)
)
self.debug(f"Tool Output: {output_str[:500]}...")
except:
except Exception:
pass

def log_llm_input(
Expand Down
6 changes: 3 additions & 3 deletions src/tools/tex_downloader.py
Original file line number Diff line number Diff line change
Expand Up @@ -141,15 +141,15 @@ def _is_tar_file(self, file_path: Path) -> bool:
try:
with tarfile.open(file_path, "r:*") as tar:
return True
except:
except Exception:
return False

def _is_zip_file(self, file_path: Path) -> bool:
"""Check if file is a zip file"""
try:
with zipfile.ZipFile(file_path, "r") as zip_file:
return True
except:
except Exception:
return False

def _extract_tar(self, tar_path: Path, extract_dir: Path):
Expand Down Expand Up @@ -204,7 +204,7 @@ def _find_main_tex(self, directory: Path) -> Path | None:
content = tex_file.read_text(encoding="utf-8", errors="ignore")
if r"\documentclass" in content:
return tex_file
except:
except Exception:
continue

# 3. Return largest tex file
Expand Down