def cmd_USER(self, line):
        """ Handler for user command.

            @param line:    line input from terminal.
            @type  line:    string
        """
        config = UserOptions(self.terminal)

        try:
            config.parseOptions(line)
            cmd = config.subCommand
            opts = config.subOptions if hasattr(config, 'subOptions') else {}
        except usage.UsageError as errortext:
            self.terminal.write("BUG in usage: {0}".format(errortext))
        else:
            if cmd == 'add':
                if opts['username'] and opts['password']:
                    self.callToUser('add_user', 'admin', opts['username'],
                                    opts['password'])
            elif cmd == 'remove':
                if opts['username']:
                    self.callToUser('remove_user', 'admin', opts['username'])
            elif cmd == 'update':
                if opts['username'] and opts['password']:
                    self.callToUser('update_user', 'admin',
                                    opts['username'], opts['password'])
            elif cmd == 'passwd':
                if opts['new'] and opts['old']:
                    self.callToUser('update_user', 'console', opts['new'],
                                    opts['old'])
            elif config['list']:
                self.callToUserAndDisplay('list_users', 'admin')
dataset/ETHPy150Open rapyuta/rce/rce-console/rce/console/console.py/ConsoleClient.cmd_USER/original