maestral.cli.common

Module Contents

maestral.cli.common.P[source]
maestral.cli.common.T[source]
maestral.cli.common.convert_api_errors(func)[source]

Decorator that catches a MaestralApiError and prints a formatted error message to stdout before exiting. Calls sys.exit(1) after printing the error to stdout.

Parameters:

func (Callable[P, T])

Return type:

Callable[P, T]

maestral.cli.common.check_for_fatal_errors(m)[source]

Checks the given Maestral instance for fatal errors such as revoked Dropbox access, deleted Dropbox folder etc. Prints a nice representation to the command line.

Parameters:

m (maestral.daemon.MaestralProxy | maestral.main.Maestral) – Proxy to Maestral daemon or Maestral instance.

Returns:

True in case of fatal errors, False otherwise.

Return type:

bool

maestral.cli.common.config_option[source]
maestral.cli.common.existing_config_option[source]
maestral.cli.common.inject_proxy(fallback, existing_config)[source]
Parameters:
  • fallback (bool)

  • existing_config (bool)

Return type:

Callable[[Callable[P, T]], Callable[P, Any]]