def registerProducer(self, producer, streaming):
        """
        Register a producer.
        """
        if self.producer:
            raise ValueError, (producer, self.producer) % "registering producer %s before previous one (%s) was unregistered"

        self.streamingProducer = streaming
        self.producer = producer

        if self.queued:
            if streaming:
                producer.pauseProducing()
        else:
            self.transport.registerProducer(producer, streaming)
dataset/ETHPy150Open kuri65536/python-for-android/python-modules/twisted/twisted/web/http.py/Request.registerProducer/swapped operands of `%`