Uploaded image for project: 'Vnfsdk'
  1. Vnfsdk
  2. VNFSDK-309

pkgtools: warning from ruamel.yaml

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Done
    • Icon: Low Low
    • Casablanca Release
    • Casablanca Release
    • None

      with ruamel.yaml==0.14.12 or older, the 'vnfsdk csar-validate' reports the following warnings:

      home/lulianhao/onap/vnfsdk/pkgtools/vnfsdk_pkgtools/packager/csar.py:264: UnsafeLoaderWarning:
      The default 'Loader' for 'load(stream)' without further arguments can be unsafe.
      Use 'load(stream, Loader=ruamel.yaml.Loader)' explicitly if that is OK.
      Alternatively include the following in your code:

      import warnings
      warnings.simplefilter('ignore', ruamel.yaml.error.UnsafeLoaderWarning)

      In most other cases you should consider using 'safe_load(stream)'
      self.metadata.update(yaml.load(f))

            lianhaolu lianhaolu
            lianhaolu lianhaolu
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated:
              Resolved: