def cmd_interactive(self, args): if self._state_service.has_state(): sys.stderr.write( "The client is already running in interactive mode\n") else: self.print_cmds() sys.stdout.write("\n") self._state_service.enter_state(DefaultState(), verbose=args.verbose)
def get_state(self): return self._current_state[ -1] if self._current_state else DefaultState()