def finish(status):
    """Call this when the operation is done, successful or not. The
        Monitor's lifetime is influenced by the completion of the operation
        it is monitoring. The Monitor's 'status' value will be set with the
        'status' argument, just as if it had been passed to set_status().
        This value will be used to fire the Deferreds that are returned by
        when_done().

        Operations that fire a Deferred when they finish should trigger this
        with d.addBoth(monitor.finish)"""
