BBBikeDownloader.print_status¶
- classmethod BBBikeDownloader.print_status(data_name='<data_name>', path_to_file='<file_path>', verbose=False, error_message=None, update=False, raise_error=False)[source]¶
Print a short message for an otherwise situation.
- Parameters:
data_name (str) – name of the prepacked data, defaults to
'<name_of_data>'path_to_file (str | os.PathLike[str]) – pathname of the prepacked data file, defaults to
"<file_path>"verbose (bool | int) – whether to print relevant information in console, defaults to
Falseerror_message (Exception | str | None) – message of an error detected during execution of a function, defaults to
Noneupdate (bool) – whether to (check on and) update the prepacked data, defaults to
Falseraise_error (bool) – Whether to raise the provided exception; if
raise_error=False(default), the error will be suppressed.
- Returns:
None.
- Return type:
None
Examples:
>>> from pydriosm.downloader._base import BaseDownloader >>> BaseDownloader.print_status() is None # Nothing will be printed. True >>> BaseDownloader.print_status(verbose=True) Cancelled. >>> BaseDownloader.print_status(verbose=2) The collecting of <data_name> is cancelled, or no data is available. >>> BaseDownloader.print_status(verbose=True, error_message="Errors.") Failed. Errors.