@plug.handler()
def delete_file(metadata):
    plug.logger.debug(u"Deleting file {}", metadata.path)
    try:
        sftp.remove(metadata.path)
    except (IOError, OSError) as e:
        raise ServiceError(u"Error deleting file '{}': {}"
                           .format(metadata.path, e))
    finally:
        if events_to_ignore in metadata.path:
            plug.logger.debug(u"Removing {} of ignored files", metadata.path)
            events_to_ignore.remove(metadata.path)
dataset/ETHPy150Open onitu/onitu/drivers/sftp/onitu_sftp/sftp.py/delete_file/swapped operands of `in`