Skip to content

Commit

Permalink
fix(workflows): simplify re-raising the exception
Browse files Browse the repository at this point in the history
Just re-raise it instead of wrapping it
  • Loading branch information
cardoe committed Feb 10, 2025
1 parent 31ede5a commit 0595e7a
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 4 deletions.
3 changes: 1 addition & 2 deletions python/understack-workflows/understack_workflows/bmc_bios.py
Original file line number Diff line number Diff line change
Expand Up @@ -52,5 +52,4 @@ def patch_bios_settings(bmc: Bmc, new_settings: dict):
if "Pending configuration values" in repr(e):
logger.info("%s BIOS settings job already queued, ignoring.", bmc)
return
else:
raise (e) from None
raise
Original file line number Diff line number Diff line change
Expand Up @@ -105,9 +105,9 @@ def _get_bmc_accounts(host: str, token: str, username: str) -> list[dict]:
logger.debug("accounts: %s", accounts)

return accounts
except Exception as e:
except Exception:
logger.exception("Can't fetch accounts from Redfish account service.")
raise e from None
raise


def _set_bmc_creds(host: str, token: str, username: str, new_password: str):
Expand Down

0 comments on commit 0595e7a

Please sign in to comment.