aboutsummaryrefslogtreecommitdiffstats
path: root/resources/tools/presentation/static_content.py
diff options
context:
space:
mode:
authorTibor Frank <tifrank@cisco.com>2019-11-20 11:43:44 +0100
committerTibor Frank <tifrank@cisco.com>2019-12-03 14:22:39 +0000
commitcbfa26dc0f5334bcd367c161b4eaad342355bbde (patch)
tree0e2c9cec7e956f914dcb8a1b1865ff4e3d7a47fd /resources/tools/presentation/static_content.py
parent375aeaab2c14e45ebe45c35947381dc248b32097 (diff)
Python3: PAL
- files renamed: - utils.py --> pal_utils.py - errors.py --> pal_errors.py - functions/methods renamed: - plot_service_density_reconf_box_name --> plot_nf_reconf_box_name - plot_performance_box_name --> plot_perf_box_name - plot_latency_error_bars_name --> plot_lat_err_bars_name - plot_throughput_speedup_analysis_name --> plot_tsa_name - plot_service_density_heatmap --> plot_nf_heatmap - table_performance_comparison --> table_perf_comparison - table_performance_comparison_nic --> table_perf_comparison_nic - table_performance_trending_dashboard_html --> table_perf_trending_dash_html - functions/methods removed: - plot_service_density_heatmap_compare - plot_throughput_speedup_analysis - plot_latency_error_bars - plot_soak_boxes - plot_soak_bars Change-Id: Icddc01d3ccb451abb92b9e5d912b642d01866033 Signed-off-by: Tibor Frank <tifrank@cisco.com>
Diffstat (limited to 'resources/tools/presentation/static_content.py')
-rw-r--r--resources/tools/presentation/static_content.py26
1 files changed, 14 insertions, 12 deletions
diff --git a/resources/tools/presentation/static_content.py b/resources/tools/presentation/static_content.py
index a02330c15f..0fb81d1cbe 100644
--- a/resources/tools/presentation/static_content.py
+++ b/resources/tools/presentation/static_content.py
@@ -22,7 +22,7 @@ from os import makedirs
from os.path import isdir
from shutil import rmtree, copytree, Error
-from errors import PresentationError
+from pal_errors import PresentationError
def prepare_static_content(spec):
@@ -31,19 +31,19 @@ def prepare_static_content(spec):
:param spec: Specification read from the specification file.
:type spec: Specification
:raises PresentationError: If it is not possible to process the static
- content.
+ content.
"""
- src = spec.static.get("src-path", None)
- dst = spec.static.get("dst-path", None)
+ src = spec.static.get(u"src-path", None)
+ dst = spec.static.get(u"dst-path", None)
if src is None or dst is None:
- logging.warning("No static content specified, skipping")
+ logging.warning(u"No static content specified, skipping")
return
# Copy all the static content to the build directory:
- logging.info("Copying the static content ...")
- logging.info(" Source: {0}".format(src))
- logging.info(" Destination: {0}".format(dst))
+ logging.info(u"Copying the static content ...")
+ logging.info(f" Source: {src}")
+ logging.info(f" Destination: {dst}")
try:
if isdir(dst):
@@ -51,10 +51,12 @@ def prepare_static_content(spec):
copytree(src, dst)
- makedirs(spec.environment["paths"]["DIR[WORKING,SRC,STATIC]"])
+ makedirs(spec.environment[u"paths"][u"DIR[WORKING,SRC,STATIC]"])
except (Error, OSError) as err:
- raise PresentationError("Not possible to process the static content.",
- str(err))
+ raise PresentationError(
+ u"Not possible to process the static content.",
+ repr(err)
+ )
- logging.info("Done.")
+ logging.info(u"Done.")