def do_end(self, end_tcs):
        """End the current session: end yes

        An optional 'yes' or 'no' argument specifies whether or not to end the
        the server's test session (yes), or only end the controller (no).
        To stop using the current session without affecting the server at all,
        use the 'join' command without specifying a session.

        If a yes or no argument is not provided, it is prompted for.
        """
        if self._not_joined():
            return

        current = self._stc.session_id()
        yn = None
        if end_tcs:
            if end_tcs == 'yes':
                yn = True
            elif end_tcs == 'no':
                yn = False

        if yn is None:
            if self.use_rawinput:
                yn = self._confirm('End test session', current)
            else:
                yn = True

        if yn:
            print('...waiting for session to end...')

        ended = False
        try:
            self._stc.end_session(yn)
        except Exception as e:
            print(e)
            return
        if yn:
            self._update_sessions()
            print('Terminated test session', current)
        else:
            print('Detached from test session', current)
def do_end ( self , end_tcs ) : if self . _not_joined ( ) : return current = self . _stc . session_id ( ) yn = None if end_tcs : if end_tcs == 'yes' : yn = True elif end_tcs == 'no' : yn = False if yn is None : if self . use_rawinput : yn = self . _confirm ( 'End test session' , current ) else : yn = True if yn : print ( '...waiting for session to end...' ) ended = False try : self . _stc . end_session ( yn ) except Exception as e : print ( e ) return if yn : self . _update_sessions ( ) print ( 'Terminated test session' , current ) else : print ( 'Detached from test session' , current )
End the current session: end yes

        An optional 'yes' or 'no' argument specifies whether or not to end the
        the server's test session (yes), or only end the controller (no).
        To stop using the current session without affecting the server at all,
        use the 'join' command without specifying a session.

        If a yes or no argument is not provided, it is prompted for.