The ironic_python_agent.utils Module

class ironic_python_agent.utils.AccumulatedFailures(exc_class=<type 'exceptions.RuntimeError'>)[source]

Bases: object

Object to accumulate failures without raising exception.

add(fail, *fmt)[source]

Add failure with optional formatting.

Parameters:
  • fail – exception or error string
  • fmt – formatting arguments (only if fail is a string)
get_error()[source]

Get error string or None.

raise_if_needed()[source]

Raise exception if error list is not empty.

Raises:RuntimeError