The original code would raise an OperationError is the backup path doesn't exist. This is not the only reason a rmtree would fail, insufficient permissions, invalid SELinux contexts, etc.
This commit wraps the rmtree functionality in a try-catch block to catch and log any exceptions that may happen.
The original code would raise an OperationError is the backup path doesn't exist. This is not the only reason a rmtree would fail, insufficient permissions, invalid SELinux contexts, etc. This commit wraps the rmtree functionality in a try-catch block to catch and log any exceptions that may happen.