ignore_errno
Context manager to ignore specific POSIX error codes.
def ignore_errno(
*errnos: Union[str, int],
types: Tuple[Exception]
) - > contextmanager
Context manager to ignore specific POSIX error codes.
Parameters
| Name | Type | Description |
|---|---|---|
| *errnos | Union[str, int] | A list of error codes to ignore, provided as either the string name (e.g., 'ENOENT') or the integer code. |
| types | Tuple[Exception] | A tuple of exception classes to catch and inspect for matching errnos; defaults to Exception. |
Returns
| Type | Description |
|---|---|
contextmanager | A context manager that suppresses exceptions with matching POSIX error codes. |