From 01cb8852c70aee46f0225926224f5bdf3507dc1b Mon Sep 17 00:00:00 2001
From: Valerio Mariani <valerio.mariani@desy.de>
Date: Wed, 18 Jan 2017 16:59:18 +0100
Subject: [PATCH] Modified the error messages in cfel_optargs

---
 cfel_optarg.py | 14 ++++++++------
 1 file changed, 8 insertions(+), 6 deletions(-)

diff --git a/cfel_optarg.py b/cfel_optarg.py
index c825f91..a06978f 100644
--- a/cfel_optarg.py
+++ b/cfel_optarg.py
@@ -85,17 +85,19 @@ def parse_parameters(config):
                     monitor_params[sect][op] = ast.literal_eval(config.get(sect, op))
                     continue
                 except (SyntaxError, ValueError):
-                    raise RuntimeError('Error parsing parameter {0} in section {1}. Make sure that the syntax is'
-                                       'correct: list elements are separated by comma, dict entries contain the colon'
-                                       'symbol and strings are quoted.'.format(op, sect))
+                    raise RuntimeError('Error parsing parameter {0} in section {1}. Make sure that the syntax is '
+                                       'correct: list elements must be separated by commas and dict entries must '
+                                       'contain the colon symbol. Strings must be quoted, even in lists and '
+                                       'dicts.'.format(op, sect))
             if monitor_params[sect][op].startswith("{") and monitor_params[sect][op].endswith("}"):
                 try:
                     monitor_params[sect][op] = ast.literal_eval(config.get(sect, op))
                     continue
                 except (SyntaxError, ValueError):
-                    raise RuntimeError('Error parsing parameter {0} in section {1}. Make sure that the syntax is'
-                                       'correct: list elements are separated by comma, dict entries contain the colon'
-                                       'symbol and strings are quoted.'.format(op, sect))
+                    raise RuntimeError('Error parsing parameter {0} in section {1}. Make sure that the syntax is '
+                                       'correct: list elements must be separated by commas and dict entries must '
+                                       'contain the colon symbol. Strings must be quoted, even in lists and '
+                                       'dicts.'.format(op, sect))
             if monitor_params[sect][op] == 'None':
                 monitor_params[sect][op] = None
                 continue
-- 
GitLab