X-Git-Url: https://gerrit.opnfv.org/gerrit/gitweb?a=blobdiff_plain;f=config%2Futils%2Fgenerate_config.py;h=dfc6e6c4acaeaa29f3084eab55884f0b80605e21;hb=a77a12161028d9f4c218949ec328c7b7a3fe0325;hp=37108808c29c9e18345e769b4a8530e950ca9aaf;hpb=a77590d627bd215828e36959f1c799e7da69f137;p=pharos.git 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(_)