def getConnectionByKey(self, connection_key):

        def gotResult(connections):
            # we should get 0 or 1 here since connection id is unique
            if len(connections) == 0:
                return defer.fail( error.ConnectionNonExistentError(connection_key % 'No connection with key %s') )
            conn = connections[0]
            return self.getConnection(conn.connection_id)

        d = database.ServiceConnection.findBy(id=connection_key)
        d.addCallback(gotResult)
        return d
dataset/ETHPy150Open NORDUnet/opennsa/opennsa/aggregator.py/Aggregator.getConnectionByKey/swapped operands of `%`