diff options
author | Tibor Frank <tifrank@cisco.com> | 2018-02-08 09:46:20 +0100 |
---|---|---|
committer | Tibor Frank <tifrank@cisco.com> | 2018-03-01 12:39:10 +0000 |
commit | a4cdbf05722f6e880f465121a416828278195bd7 (patch) | |
tree | 1cd7e29e8773d553d440b21bdd7aa33642cf08e5 /resources/tools/presentation | |
parent | 02f01f9f327cc64745c1941968813b3f107ca771 (diff) |
PAL: Clean the code
Change-Id: I7aa196cdc7bf4d34c1313f8f811ab3f6dd8f10f2
Signed-off-by: Tibor Frank <tifrank@cisco.com>
Diffstat (limited to 'resources/tools/presentation')
-rw-r--r-- | resources/tools/presentation/input_data_parser.py | 2 | ||||
-rw-r--r-- | resources/tools/presentation/static_content.py | 7 |
2 files changed, 6 insertions, 3 deletions
diff --git a/resources/tools/presentation/input_data_parser.py b/resources/tools/presentation/input_data_parser.py index e1763b97d2..203a3bfd25 100644 --- a/resources/tools/presentation/input_data_parser.py +++ b/resources/tools/presentation/input_data_parser.py @@ -866,7 +866,7 @@ class InputData(object): except (KeyError, IndexError, ValueError) as err: logging.error(" Missing mandatory parameter in the element " - "specification.", err) + "specification: {0}".format(err)) return None except AttributeError: return None diff --git a/resources/tools/presentation/static_content.py b/resources/tools/presentation/static_content.py index fe2d0724bf..a02330c15f 100644 --- a/resources/tools/presentation/static_content.py +++ b/resources/tools/presentation/static_content.py @@ -34,8 +34,11 @@ def prepare_static_content(spec): content. """ - src = spec.static["src-path"] - dst = spec.static["dst-path"] + src = spec.static.get("src-path", None) + dst = spec.static.get("dst-path", None) + if src is None or dst is None: + logging.warning("No static content specified, skipping") + return # Copy all the static content to the build directory: logging.info("Copying the static content ...") |