Skip to content

Commit

Permalink
remove testing statements
Browse files Browse the repository at this point in the history
  • Loading branch information
kubealex committed Jan 18, 2024
1 parent 2ed5924 commit 4ce5978
Showing 1 changed file with 18 additions and 12 deletions.
30 changes: 18 additions & 12 deletions extensions/eda/plugins/event_source/dt_esa_api.py
Original file line number Diff line number Diff line change
Expand Up @@ -33,12 +33,15 @@ async def getproblems(dt_host: str, dt_token: str) -> None:
async with session.get(url) as resp:
try:
return await resp.json()
except aiohttp.ClientResponseError:
return {}
except aiohttp.ClientConnectionError:
return {}
except aiohttp.ClientError:
return {}
except aiohttp.ClientResponseError as client_response_error:
logging.exception("ClientResponseError: %s", client_response_error)
raise
except aiohttp.ClientConnectionError as connection_error:
logging.exception("ClientConnectionError: %s", connection_error)
raise
except aiohttp.ClientError as client_error:
logging.exception("Aiohttp ClientError: %s", client_error)
raise

async def updatedtproblem(prob_id: str, dtapihost: str, dtapitoken: str) -> None:
"""Update problem comment once its sent to the EDA server.
Expand Down Expand Up @@ -72,12 +75,15 @@ async def updatedtproblem(prob_id: str, dtapihost: str, dtapitoken: str) -> None
if resp.status != warning_status:
logging.warning(resp.status)
logging.warning(resp.text)
except aiohttp.ClientResponseError:
return {}
except aiohttp.ClientConnectionError:
return {}
except aiohttp.ClientError:
return {}
except aiohttp.ClientResponseError as client_response_error:
logging.exception("ClientResponseError: %s", client_response_error)
raise
except aiohttp.ClientConnectionError as connection_error:
logging.exception("ClientConnectionError: %s", connection_error)
raise
except aiohttp.ClientError as client_error:
logging.exception("Aiohttp ClientError: %s", client_error)
raise

async def main(queue: asyncio.Queue, args: dict[str, Any]) -> None:
"""Process the problem information.
Expand Down

0 comments on commit 4ce5978

Please sign in to comment.