@staticmethod
    def _get_commands(inst):
        cmds = {}
        for objname in dir(inst):
            obj = getattr(inst, objname)
            if getattr(obj, '_is_cmd', False):
                try:
                    cmds[obj._cmd_name] = (obj, inst)
                except __HOLE__:
                    # skip it if there's no _cmd_name
                    pass
        return cmds
dataset/ETHPy150Open rackerlabs/openstack-guest-agents-unix/commands/__init__.py/CommandBase._get_commands