Exceptions#

exception PatcherError(message: AnyStr = None, **kwargs)[source]#

Base exception class for exceptions with automatic traceback logging and concise error display.

Parameters:

message (AnyStr)

log_traceback()[source]#

Log the traceback of the exception. See handle_traceback().

display_message()[source]#

Display the error message to the console.

format_message() str[source]#

Format exception message properly.

Return type:

str

exception CredentialDeletionError(cred: AnyStr | None = None)[source]#

Raised when there is a specified credential could not be removed from keychain.

Parameters:

cred (AnyStr | None)

exception TokenFetchError(reason: AnyStr | None = None)[source]#

Raised when there is an error fetching a bearer token from Jamf API.

Parameters:

reason (AnyStr | None)

exception TokenLifetimeError(lifetime: int | None = None)[source]#

Raised when the token lifetime is too short.

Parameters:

lifetime (int | None)

exception DirectoryCreationError(path: AnyStr | None = None)[source]#

Raised when there is an error creating directories.

Parameters:

path (AnyStr | None)

exception PlistError(path: AnyStr | None = None)[source]#

Raised when there is an error interacting with plist.

Parameters:

path (AnyStr | None)

exception ExportError(file_path: AnyStr | None = None)[source]#

Raised when encountering error(s) exporting data to files.

Parameters:

file_path (AnyStr | None)

exception PolicyFetchError(url: AnyStr | None = None)[source]#

Raised when unable to fetch policy IDs from the Jamf instance.

Parameters:

url (AnyStr | None)

exception SummaryFetchError(url: AnyStr | None = None)[source]#

Raised when there is an error fetching summaries.

Parameters:

url (AnyStr | None)

exception DeviceIDFetchError(reason: AnyStr | None = None)[source]#

Raised when there is an error fetching device IDs from the Jamf instance.

Parameters:

reason (AnyStr | None)

exception DeviceOSFetchError(reason: AnyStr | None = None)[source]#

Raised when there is an error fetching device OS information from the Jamf instance.

Parameters:

reason (AnyStr | None)

exception SortError(column: AnyStr | None = None)[source]#

Raised when there is an error sorting columns.

Parameters:

column (AnyStr | None)

exception SofaFeedError(reason: AnyStr | None = None, url: AnyStr = 'https://sofa.macadmins.io/v1/ios_data_feed.json')[source]#

Raised when there is an error fetching SOFA feed data.

Parameters:
  • reason (AnyStr | None)

  • url (AnyStr)

exception APIPrivilegeError(reason: AnyStr | None = None)[source]#

Raised when the provided API client does not have sufficient privileges for API call type.

Parameters:

reason (AnyStr | None)