<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def receive_reply(self, msg, content):
 """Handle replies with reading results."""

        reply_head = content.head()
        if reply_head == 'error':
            comment = content.gets('comment')
            logger.error('Got error reply: "%s"' % comment)
        else:
            extractions = content.gets('ekb')
            self.extractions.append(extractions)
        self.reply_counter -= 1
        if self.reply_counter == 0:
            self.exit(0)