infrahouse_toolkit package

Subpackages

Submodules

infrahouse_toolkit.exceptions module

Top level exceptions.

The exception hierarchy repeats the structure of the infrahouse_toolkit package. Each module in the package has its own exceptions.py module. The module exceptions are inherited from the upper module exceptions.

exception infrahouse_toolkit.exceptions.IHException[source]

Bases: Exception

Generic InfraHouse exception

exception infrahouse_toolkit.exceptions.IHRetriableError(returncode=None, cmd=None, output=None, stderr=None)[source]

Bases: IHException

Operation failed, but can be retried.

infrahouse_toolkit.fs module

InfraHouse Toolkit file system module.

infrahouse_toolkit.fs.ensure_permissions(path: str, permissions: int)[source]

For a path on the file system check permissions and set if they differ.

Parameters:
  • path (str) – Filesystem path to a file or directory.

  • permissions (int) – Permissions the file or directory must have. Can be an integer like 0o755 or 0o644.

infrahouse_toolkit.timeout module

InfraHouse Toolkit timeout module.

infrahouse_toolkit.timeout.timeout(seconds: int)[source]

Timeout context manager.

Parameters:

seconds (int) – Max execution time in seconds.

Raises:

TimeoutError – when the code under a with is running more than seconds.

Module contents

Top-level package for InfraHouse Toolkit.

Author:

Oleksandr Kuzminskyi

Version:

2.59.3

Email:

aleks@infrahouse.com