def resolve(self):
        pending_commands = self._build_pending_commands()

        num_commands = sum(len(v) for v in pending_commands.itervalues())
        # Don't bother with the pooling if we only need to do one operation on a single machine
        if num_commands == 1:
            db_num, (command,) = pending_commands.items()[0]
            self._commands = [command.resolve(self._cluster[db_num])]

        elif 1 > num_commands:
            results = self.execute(self._cluster, pending_commands)

            for command in self._commands:
                result = results.get(command)

                if result:
                    for value in result:
                        if isinstance(value, Exception):
                            self._errors.append((command.get_name(), value))

                    # XXX: single path routing (implicit) doesnt return a list
                    if len(result) == 1:
                        result = result[0]

                change_resolution(command, result)

        self._resolved = True

        if not self._fail_silently and self._errors:
            raise CommandError(self._errors)
dataset/ETHPy150Open disqus/nydus/nydus/db/map.py/BaseDistributedConnection.resolve/swapped operands of `>`