780e9097e3394c0b1b6b3c7f2864fa4250d8fa96,parlai/mturk/core/agents.py,MTurkAgent,email_worker,#MTurkAgent#Any#Any#,421

Before Change


    def email_worker(self, subject, message_text):
        response = self.manager.email_worker(worker_id=self.worker_id, subject=subject, message_text=message_text)
        if "success" in response:
            print("Email sent to worker ID: "+str(self.worker_id)+": Subject: "+str(subject)+": Text: "+str(message_text))
            return True
        elif "failure" in response:
            print("Unable to send email to worker ID: "+str(self.worker_id)+". Error: "+str(response["failure"]))
            return False

After Change


            message_text=message_text
        )
        if "success" in response:
            print_and_log(
                "Email sent to worker ID: {}: Subject: {}: Text: {}".format(
                    self.worker_id,
                    subject,
                    message_text
                )
            )
            return True
        elif "failure" in response:
            print_and_log(
                "Unable to send email to worker ID: {}. Error: {}".format(
Italian Trulli
In pattern: SUPERPATTERN

Frequency: 3

Non-data size: 10

Instances


Project Name: facebookresearch/ParlAI
Commit Name: 780e9097e3394c0b1b6b3c7f2864fa4250d8fa96
Time: 2017-09-05
Author: Jackurbs@gmail.com
File Name: parlai/mturk/core/agents.py
Class Name: MTurkAgent
Method Name: email_worker


Project Name: facebookresearch/ParlAI
Commit Name: 780e9097e3394c0b1b6b3c7f2864fa4250d8fa96
Time: 2017-09-05
Author: Jackurbs@gmail.com
File Name: parlai/mturk/core/agents.py
Class Name: MTurkAgent
Method Name: reject_work


Project Name: facebookresearch/ParlAI
Commit Name: 780e9097e3394c0b1b6b3c7f2864fa4250d8fa96
Time: 2017-09-05
Author: Jackurbs@gmail.com
File Name: parlai/mturk/core/agents.py
Class Name: MTurkAgent
Method Name: approve_work