[CLEANUP ERROR]

pull/633/merge
Your Name 2 months ago
parent 1f47866722
commit f34010f204

@ -5,7 +5,7 @@ build-backend = "poetry.core.masonry.api"
[tool.poetry]
name = "swarms"
version = "6.1.0"
version = "6.1.1"
description = "Swarms - Pytorch"
license = "MIT"
authors = ["Kye Gomez <kye@apac.ai>"]

@ -228,7 +228,7 @@ class AgentRegistry:
logger.info("Listing all agents.")
return agent_names
except Exception as e:
report_error(e)
logger.error(f"Error: {e}")
raise e
def return_all_agents(self) -> List[Agent]:
@ -244,7 +244,7 @@ class AgentRegistry:
logger.info("Returning all agents.")
return agents
except Exception as e:
report_error(e)
logger.error(f"Error: {e}")
raise e
def query(
@ -275,7 +275,7 @@ class AgentRegistry:
logger.info("Querying agents with condition.")
return agents
except Exception as e:
report_error(e)
logger.error(f"Error: {e}")
raise e
def find_agent_by_name(self, agent_name: str) -> Optional[Agent]:
@ -299,7 +299,7 @@ class AgentRegistry:
if agent.agent_name == agent_name:
return agent
except Exception as e:
report_error(e)
logger.error(f"Error: {e}")
raise e
def agent_to_py_model(self, agent: Agent):

@ -2,7 +2,9 @@ from functools import wraps
from time import time
from typing import Any, Callable
from swarms.utils.loguru_logger import logger
from swarms.utils.loguru_logger import initialize_logger
logger = initialize_logger("try_except_wrapper")
def retry(
@ -113,12 +115,12 @@ def try_except_wrapper(verbose: bool = False):
return result
except Exception as error:
if verbose:
report_error(
logger.error(
f"An error occurred in function {func.__name__}:"
f" {error}"
)
else:
report_error(
logger.error(
f"An error occurred in function {func.__name__}:"
f" {error}"
)

Loading…
Cancel
Save