def __exit__(self, exc_type, exc_value, *args):
        ''' exit the AsperaTransferManager scope
            cancel all running transfers and free resources  '''
        cancel = False
        cancel_msg = ''
        cancel_exc_type = FatalError
        # If a exception was raised in the context handler, signal to cancel
        # all of the in progress futures in the shutdown.
        if exc_type:
            cancel = True
            cancel_msg = six.text_type(exc_value)
            if not cancel_msg:
                cancel_msg = repr(exc_value)
            # If it was a KeyboardInterrupt, the cancellation was initiated by the user.
            if isinstance(exc_value, KeyboardInterrupt):
                cancel_exc_type = CancelledError
        self._shutdown(cancel, cancel_msg, cancel_exc_type)
def __exit__ ( self , exc_type , exc_value , * args ) : cancel = False cancel_msg = '' cancel_exc_type = FatalError if exc_type : cancel = True cancel_msg = six . text_type ( exc_value ) if not cancel_msg : cancel_msg = repr ( exc_value ) if isinstance ( exc_value , KeyboardInterrupt ) : cancel_exc_type = CancelledError self . _shutdown ( cancel , cancel_msg , cancel_exc_type )
exit the AsperaTransferManager scope
            cancel all running transfers and free resources