From be1e32800cd11643b8d7a6b61fbe55f2c99ab76c Mon Sep 17 00:00:00 2001
From: Mattia Mancini <mancini@astron.nl>
Date: Tue, 21 Nov 2017 09:33:34 +0000
Subject: [PATCH] Task #11482: Applied review comments

---
 .../framework/lofarpipe/support/loggingdecorators.py       | 2 +-
 LCS/PyCommon/defaultmailaddresses.py                       | 7 +++----
 LCS/PyCommon/test/t_defaultmailaddresses.py                | 4 ++--
 3 files changed, 6 insertions(+), 7 deletions(-)

diff --git a/CEP/Pipeline/framework/lofarpipe/support/loggingdecorators.py b/CEP/Pipeline/framework/lofarpipe/support/loggingdecorators.py
index 19ecc9f43be..6fb010563a6 100644
--- a/CEP/Pipeline/framework/lofarpipe/support/loggingdecorators.py
+++ b/CEP/Pipeline/framework/lofarpipe/support/loggingdecorators.py
@@ -189,7 +189,7 @@ def mail_log_on_exception(target):
             try:
                 pconfig = PipelineEmailConfig()
             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:
                 _mail_msg_to(pconfig['error-sender'], entry,
diff --git a/LCS/PyCommon/defaultmailaddresses.py b/LCS/PyCommon/defaultmailaddresses.py
index e16653e5fb6..d67442d11e0 100644
--- a/LCS/PyCommon/defaultmailaddresses.py
+++ b/LCS/PyCommon/defaultmailaddresses.py
@@ -1,6 +1,6 @@
-# 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)
 # P.O.Box 2, 7990 AA Dwingeloo, The Netherlands
 #
@@ -59,7 +59,7 @@ class PipelineEmailConfig():
             filepatterns = ["{LOFARROOT}/etc/email/*.ini",
                     "{HOME}/.lofar/email/*.ini"]# TODO correct the pattern here
         self.configfiles = sum([findfiles(p) for p in filepatterns],[])
-        if len(self.configfiles) == 0:
+        if not self.configfiles:
             raise Exception("no config file found")
         self.config = None
 
@@ -74,7 +74,6 @@ class PipelineEmailConfig():
 
     def __getitem__(self, what):
         return self.get(what)
-#pipelines = {"error-sender":"softwaresupport@lofar.eu"}
 
 
 
diff --git a/LCS/PyCommon/test/t_defaultmailaddresses.py b/LCS/PyCommon/test/t_defaultmailaddresses.py
index fde9ee36ada..9fc2dd1c957 100644
--- a/LCS/PyCommon/test/t_defaultmailaddresses.py
+++ b/LCS/PyCommon/test/t_defaultmailaddresses.py
@@ -43,10 +43,10 @@ error-sender = softwaresupport@astron.nl
 
         
 
-def main(argv):
+def main():
   unittest.main()
 
 if __name__ == "__main__":
   # run all tests
   import sys
-  main(sys.argv[1:])
+  main()
-- 
GitLab