diff --git a/src/caosadvancedtools/crawler.py b/src/caosadvancedtools/crawler.py index 56198d1a4f274cfdfb5314a16c34f53b8e2839ed..099b8fd86656bd326c91e7754fa32a3d4ba76564 100644 --- a/src/caosadvancedtools/crawler.py +++ b/src/caosadvancedtools/crawler.py @@ -430,7 +430,7 @@ class Crawler(object): if "SHARED_DIR" in os.environ: filename = Crawler.save_form([el[3] for el in pending_changes], path, self.run_id) - self.send_mail([el[3] for el in pending_changes], filename) + Crawler.send_mail([el[3] for el in pending_changes], filename) for i, el in enumerate(pending_changes): @@ -441,8 +441,7 @@ ____________________\n""".format(i+1, len(pending_changes)) + str(el[3])) logger.info("There where unauthorized changes (see above). An " "email was sent to the curator.\n" "You can authorize the updates by invoking the crawler" - " with the run id: {rid}\n".format(rid=self.run_id, - path=path)) + " with the run id: {rid}\n".format(rid=self.run_id)) if len(DataModelProblems.missing) > 0: err_msg = ("There were problems with one or more RecordType or " @@ -562,7 +561,8 @@ ____________________\n""".format(i+1, len(pending_changes)) + str(el[3])) f.write(form) return filename - def send_mail(self, changes, filename): + @staticmethod + def send_mail(changes, filename): """ calls sendmail in order to send a mail to the curator about pending changes