runway.exceptions module

Runway exceptions.

exception runway.exceptions.RunwayError(*args: typing.Any, **kwargs: typing.Any)[source]

Bases: Exception

Base class for custom exceptions raised by Runway.

Instantiate class.

with_traceback()

Exception.with_traceback(tb) – set self.__traceback__ to tb and return self.

exception runway.exceptions.ConfigNotFound(*, looking_for: Optional[List[str]] = None, path: Path)[source]

Bases: runway.exceptions.RunwayError

Configuration file could not be found.

Instantiate class.

Parameters
  • path – Path where the config file was expected to be found.

  • looking_for – List of file names that were being looked for.

with_traceback()

Exception.with_traceback(tb) – set self.__traceback__ to tb and return self.

exception runway.exceptions.FailedLookup(lookup: VariableValueLookup, cause: Exception, *args: Any, **kwargs: Any)[source]

Bases: runway.exceptions.RunwayError

Intermediary Exception to be converted to FailedVariableLookup.

Should be caught by error handling and runway.cfngin.exceptions.FailedVariableLookup raised instead to construct a propper error message.

Instantiate class.

Parameters
  • lookup – The variable value lookup that was attempted and resulted in an exception being raised.

  • cause – The exception that was raised.

with_traceback()

Exception.with_traceback(tb) – set self.__traceback__ to tb and return self.

exception runway.exceptions.FailedVariableLookup(variable: Variable, lookup_error: FailedLookup, *args: Any, **kwargs: Any)[source]

Bases: runway.exceptions.RunwayError

Lookup could not be resolved.

Raised when an exception is raised when trying to resolve a lookup.

Instantiate class.

Parameters
  • variable – The variable containing the failed lookup.

  • lookup_error – The exception that was raised directly before this one.

with_traceback()

Exception.with_traceback(tb) – set self.__traceback__ to tb and return self.

exception runway.exceptions.HclParserError(exc: Exception, file_path: Union[Path, str], parser: Optional[ModuleType] = None)[source]

Bases: runway.exceptions.RunwayError

HCL/HCL2 parser error.

Instantiate class.

Parameters
  • exc – Exception that was raised.

  • file_path – File that resulted in the error.

  • parser – The parser what was used to try to parse the file (hcl|hcl2).

with_traceback()

Exception.with_traceback(tb) – set self.__traceback__ to tb and return self.

exception runway.exceptions.InvalidLookupConcatenation(invalid_lookup: VariableValue, concat_lookups: VariableValueConcatenation[Any], *args: Any, **kwargs: Any)[source]

Bases: runway.exceptions.RunwayError

Invalid return value for a concatinated (chained) lookup.

The return value must be a string when lookups are concatinated.

Instantiate class.

with_traceback()

Exception.with_traceback(tb) – set self.__traceback__ to tb and return self.

exception runway.exceptions.KubectlVersionNotSpecified(*args: typing.Any, **kwargs: typing.Any)[source]

Bases: runway.exceptions.RunwayError

kubectl version is required but was not specified.

Version can be specified by using a file or option.

Instantiate class.

with_traceback()

Exception.with_traceback(tb) – set self.__traceback__ to tb and return self.

exception runway.exceptions.NpmNotFound(*args: typing.Any, **kwargs: typing.Any)[source]

Bases: runway.exceptions.RunwayError

Raised when npm could not be executed or was not found in path.

Instantiate class.

with_traceback()

Exception.with_traceback(tb) – set self.__traceback__ to tb and return self.

exception runway.exceptions.OutputDoesNotExist(stack_name: str, output: str, *args: typing.Any, **kwargs: typing.Any)[source]

Bases: runway.exceptions.RunwayError

Raised when a specific stack output does not exist.

Instantiate class.

Parameters
  • stack_name – Name of the stack.

  • output – The output that does not exist.

with_traceback()

Exception.with_traceback(tb) – set self.__traceback__ to tb and return self.

exception runway.exceptions.UnknownLookupType(lookup: VariableValueLookup, *args: Any, **kwargs: Any)[source]

Bases: runway.exceptions.RunwayError

Lookup type provided does not match a registered lookup.

Example

If a lookup of ${<lookup_type> query} is used and <lookup_type> is not a registered lookup, this exception will be raised.

Instantiate class.

Parameters

lookup – Variable value lookup that could not find a handler.

with_traceback()

Exception.with_traceback(tb) – set self.__traceback__ to tb and return self.

exception runway.exceptions.UnresolvedVariable(variable: Variable, *args: Any, **kwargs: Any)[source]

Bases: runway.exceptions.RunwayError

Raised when trying to use a variable before it has been resolved.

Instantiate class.

Parameters

variable – The unresolved variable.

with_traceback()

Exception.with_traceback(tb) – set self.__traceback__ to tb and return self.

exception runway.exceptions.UnresolvedVariableValue(lookup: VariableValueLookup, *args: Any, **kwargs: Any)[source]

Bases: runway.exceptions.RunwayError

Intermediary Exception to be converted to UnresolvedVariable.

Should be caught by error handling and runway.cfngin.exceptions.UnresolvedVariable raised instead to construct a propper error message.

Instantiate class.

Parameters

lookup – The variable value lookup that is not resolved.

with_traceback()

Exception.with_traceback(tb) – set self.__traceback__ to tb and return self.

exception runway.exceptions.VariablesFileNotFound(file_path: pathlib.Path)[source]

Bases: runway.exceptions.RunwayError

Defined variables file could not be found.

Instantiate class.

Parameters

file_path – Path where the file was expected to be found.

with_traceback()

Exception.with_traceback(tb) – set self.__traceback__ to tb and return self.