(err=error.DEVICE_IO_ERROR)
Catch and translate I/O errors.
Catch and translate I/O errors.
Catch and translate I / O errors .
def safe_io(err=error.DEVICE_IO_ERROR):
    """Catch and translate I/O errors."""
    try:
        yield
    except EnvironmentError as e:
        logging.warning('I/O error on stream access: %s', e)
        raise error.BASICError(err)
def safe_io ( err = error . DEVICE_IO_ERROR ) : try : yield except EnvironmentError as e : logging . warning ( 'I/O error on stream access: %s' , e ) raise error . BASICError ( err )