qgis_deployment_toolbelt.utils.bouncer module#

Shortcuts to exit CLI properly and with pretty messages.

Author: Julien Moura (github.com/guts)

qgis_deployment_toolbelt.utils.bouncer.exit_cli_error(message: str | Exception, abort: bool = True)#

Display error message and stop execution.

Parameters:
  • message (Union[str, Exception]) – message to log and display in terminal.

  • abort (bool, optional) – option to abort after displaying. Defaults to True.

Raises:

SystemExit – when abort is True

qgis_deployment_toolbelt.utils.bouncer.exit_cli_normal(message: str | Exception, abort: bool = True)#

Display normal message and stop execution if required.

Parameters:
  • message (Union[str, Exception]) – message to log and display in terminal.

  • abort (bool, optional) – option to abort after displaying. Defaults to True.

Raises:

SystemExit – when abort is True

qgis_deployment_toolbelt.utils.bouncer.exit_cli_success(message: str | Exception, abort: bool = True)#

Display success message and stop execution ir required.

Parameters:
  • message (Union[str, Exception]) – message to log and display in terminal.

  • abort (bool, optional) – option to abort after displaying. Defaults to True.

Raises:

SystemExit – when abort is True