summaryrefslogtreecommitdiffstats
path: root/config
diff options
context:
space:
mode:
authoragardner <agardner@linuxfoundation.org>2017-12-20 14:31:05 -0500
committerAlexandru Avadanii <Alexandru.Avadanii@enea.com>2017-12-20 21:39:39 +0100
commit60b29f9b9b265b231f1990877e7042a84508db50 (patch)
treef7ed234a96f9b48725e2befed48ec6f19bcf55bc /config
parent89d7cb905bf6f286648638f5865884ac5e332e59 (diff)
validate-pdf-jinja2-templates-master failing
If keys do not exist, the skipping decryption python stuff doesn't work, see: https://build.opnfv.org/ci/job/validate-pdf-jinja2-templates-master/16/consoleFull Still does not fallback to plain in the case of a 'bad decryption', but the current code does not either, bad decryption is logged in any case. Change-Id: I8da2c7cf8568a6e77ca24cc9ce665410d93b7ba9 Signed-off-by: agardner <agardner@linuxfoundation.org>
Diffstat (limited to 'config')
-rwxr-xr-xconfig/utils/check-jinja2.sh2
-rwxr-xr-xconfig/utils/generate_config.py6
2 files changed, 4 insertions, 4 deletions
diff --git a/config/utils/check-jinja2.sh b/config/utils/check-jinja2.sh
index a19d2090..2953ff6a 100755
--- a/config/utils/check-jinja2.sh
+++ b/config/utils/check-jinja2.sh
@@ -61,7 +61,7 @@ To troubleshoot PDF parsing against a specific installer adapter,
execute the following commands locally (e.g. for zte-pod2/joid):
$ ./config/utils/generate_config.py \\
-y labs/zte/pod2.yaml \\
- -j ./pharos/config/installers/joid/pod_config.yaml.j2
+ -j config/installers/joid/pod_config.yaml.j2
EOF
exit "${RC}"
diff --git a/config/utils/generate_config.py b/config/utils/generate_config.py
index 37108808..dfc6e6c4 100755
--- a/config/utils/generate_config.py
+++ b/config/utils/generate_config.py
@@ -57,12 +57,12 @@ ENV.filters['dpkg_arch'] = dpkg_arch
try:
DICT = yaml.safe_load(check_output(['eyaml', 'decrypt', '-f', ARGS.yaml]))
except CalledProcessError as ex:
- logging.error('eyaml decryption failed, keys might be missing')
+ logging.error('eyaml decryption failed!')
except OSError as ex:
logging.warn('eyaml not found, skipping decryption')
try:
- DICT
-except NameError as ex:
+ DICT['details']
+except (NameError, TypeError) as ex:
logging.warn('PDF decryption skipped, fallback to using raw data.')
with open(ARGS.yaml) as _:
DICT = yaml.safe_load(_)