Skip to content
Snippets Groups Projects
Commit be1e3280 authored by Mattia Mancini's avatar Mattia Mancini
Browse files

Task #11482: Applied review comments

parent 7ecaed55
No related branches found
No related tags found
No related merge requests found
...@@ -189,7 +189,7 @@ def mail_log_on_exception(target): ...@@ -189,7 +189,7 @@ def mail_log_on_exception(target):
try: try:
pconfig = PipelineEmailConfig() pconfig = PipelineEmailConfig()
except Exception as e: except Exception as e:
raise Exception("loggingdecorators.py: Could not find the pipeline default configuration file: %s" % (e) ) raise Exception("loggingdecorators.py: Could not find the pipeline email configuration file: %s" % (e) )
for entry in mail_list: for entry in mail_list:
_mail_msg_to(pconfig['error-sender'], entry, _mail_msg_to(pconfig['error-sender'], entry,
......
# util.py: utils for lofar software # defaultmailaddresses.py: default mail addresses for the LOFAR software
# #
# Copyright (C) 2015 # Copyright (C) 2017
# ASTRON (Netherlands Institute for Radio Astronomy) # ASTRON (Netherlands Institute for Radio Astronomy)
# P.O.Box 2, 7990 AA Dwingeloo, The Netherlands # P.O.Box 2, 7990 AA Dwingeloo, The Netherlands
# #
...@@ -59,7 +59,7 @@ class PipelineEmailConfig(): ...@@ -59,7 +59,7 @@ class PipelineEmailConfig():
filepatterns = ["{LOFARROOT}/etc/email/*.ini", filepatterns = ["{LOFARROOT}/etc/email/*.ini",
"{HOME}/.lofar/email/*.ini"]# TODO correct the pattern here "{HOME}/.lofar/email/*.ini"]# TODO correct the pattern here
self.configfiles = sum([findfiles(p) for p in filepatterns],[]) self.configfiles = sum([findfiles(p) for p in filepatterns],[])
if len(self.configfiles) == 0: if not self.configfiles:
raise Exception("no config file found") raise Exception("no config file found")
self.config = None self.config = None
...@@ -74,7 +74,6 @@ class PipelineEmailConfig(): ...@@ -74,7 +74,6 @@ class PipelineEmailConfig():
def __getitem__(self, what): def __getitem__(self, what):
return self.get(what) return self.get(what)
#pipelines = {"error-sender":"softwaresupport@lofar.eu"}
......
...@@ -43,10 +43,10 @@ error-sender = softwaresupport@astron.nl ...@@ -43,10 +43,10 @@ error-sender = softwaresupport@astron.nl
def main(argv): def main():
unittest.main() unittest.main()
if __name__ == "__main__": if __name__ == "__main__":
# run all tests # run all tests
import sys import sys
main(sys.argv[1:]) main()
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment