This commit is contained in:
eason 2026-03-24 14:40:26 +08:00 committed by GitHub
commit 0a7703689a
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
10 changed files with 11 additions and 11 deletions

View File

@ -34,7 +34,7 @@ def reset_password(email, new_password, password_confirm):
try:
valid_password(new_password)
except:
except Exception:
click.echo(click.style(f"Invalid password. Must match {password_pattern}", fg="red"))
return
@ -74,7 +74,7 @@ def reset_email(email, new_email, email_confirm):
try:
email_validate(normalized_new_email)
except:
except Exception:
click.echo(click.style(f"Invalid email: {new_email}", fg="red"))
return

View File

@ -49,7 +49,7 @@ class CotAgentOutputParser:
json_text = re.sub(r"^[a-zA-Z]+\n", "", block.strip(), flags=re.MULTILINE)
json_blocks.append(json.loads(json_text, strict=False))
return json_blocks
except:
except Exception:
return []
code_block_cache = ""

View File

@ -57,7 +57,7 @@ class AnalyticdbVectorOpenAPI:
try:
from alibabacloud_gpdb20160503.client import Client # type: ignore
from alibabacloud_tea_openapi import models as open_api_models # type: ignore
except:
except Exception:
raise ImportError(_import_err_msg)
self._collection_name = collection_name.lower()
self.config = config

View File

@ -231,7 +231,7 @@ class LindormVectorStore(BaseVector):
params["routing"] = self._routing
self._client.get(index=self._collection_name, id=id, params=params)
return True
except:
except Exception:
return False
def search_by_vector(self, query_vector: list[float], **kwargs: Any) -> list[Document]:

View File

@ -167,7 +167,7 @@ class OpenSearchVector(BaseVector):
try:
self._client.get(index=self._collection_name.lower(), id=id)
return True
except:
except Exception:
return False
def search_by_vector(self, query_vector: list[float], **kwargs: Any) -> list[Document]:

View File

@ -80,7 +80,7 @@ class AwsS3Storage(BaseStorage):
try:
self.client.head_object(Bucket=self.bucket_name, Key=filename)
return True
except:
except Exception:
return False
def delete(self, filename: str):

View File

@ -52,7 +52,7 @@ class OracleOCIStorage(BaseStorage):
try:
self.client.head_object(Bucket=self.bucket_name, Key=filename)
return True
except:
except Exception:
return False
def delete(self, filename: str):

View File

@ -212,7 +212,7 @@ def check_csrf_token(request: Request, user_id: str):
verified = {}
try:
verified = PassportService().verify(csrf_token)
except:
except Exception:
_unauthorized()
if verified.get("sub") != user_id:

View File

@ -412,7 +412,7 @@ class AppService:
if provider is None:
raise ValueError(f"provider not found for tool {tool_name}")
meta["tool_icons"][tool_name] = json.loads(provider.icon)
except:
except Exception:
meta["tool_icons"][tool_name] = {"background": "#252525", "content": "\ud83d\ude01"}
return meta

View File

@ -831,7 +831,7 @@ class WebhookService:
response_data = {"message": response_body}
else:
response_data = {"status": "success", "message": "Webhook processed successfully"}
except:
except Exception:
response_data = {"message": response_body or "Webhook processed successfully"}
return response_data, status_code