def do_help(self, arg):
        if arg:
            # XXX check arg syntax
            try:
                func = getattr(self, 'help_' + arg)
            except AttributeError:
                try:
                    doc=getattr(self, 'do_' + arg).__doc__
                    if doc:
                        self.ctl.stdout.write("%s\n"%str(doc))
                        return
                except AttributeError:
                    pass
                self.ctl.stdout.write("%s\n"%str((arg,) % self.ctl.nohelp))
                return
            func()
        else:
            names = get_names(self)
            cmds_doc = []
            cmds_undoc = []
            help = {}
            for name in names:
                if name[:5] == 'help_':
                    help[name[5:]]=1
            names.sort()
            # There can be duplicates if routines overridden
            prevname = ''
            for name in names:
                if name[:3] == 'do_':
                    if name == prevname:
                        continue
                    prevname = name
                    cmd=name[3:]
                    if cmd in help:
                        cmds_doc.append(cmd)
                        del help[cmd]
                    elif getattr(self, name).__doc__:
                        cmds_doc.append(cmd)
                    else:
                        cmds_undoc.append(cmd)
            self.ctl.stdout.write("\n")
            self.ctl.print_topics(self.doc_header,   cmds_doc,   15,80)
dataset/ETHPy150Open XiaoMi/minos/supervisor/supervisor/supervisorctl.py/ControllerPluginBase.do_help/swapped operands of `%`