Uploaded image for project: 'CFEngine Community'
  1. CFEngine Community
  2. CFE-3880

Traceback from cfbs validate

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Need more Info
    • Priority: (None)
    • Resolution: Unresolved
    • Affects Version/s: None
    • Fix Version/s: None
    • Component/s: cfbs
    • Labels:
      None

      Description

      I should get a human readable error instead of a traceback.

      ❯ cfbs --version
      cfbs 1.2.1
      
      ❯ cfbs validate cfbs.json
      Traceback (most recent call last):
        File "/home/nickanderson/.local/bin/cfbs", line 8, in <module>
          sys.exit(main())
        File "/home/nickanderson/.local/lib/python3.9/site-packages/cfbs/main.py", line 131, in main
          return commands.validate_command(index_path=args.index)
        File "/home/nickanderson/.local/lib/python3.9/site-packages/cfbs/commands.py", line 813, in validate_command
          index = config.index
        File "/home/nickanderson/.local/lib/python3.9/site-packages/cfbs/index.py", line 208, in index
          self._index = Index(data=_expand_index(self._unexpanded_index))
        File "/home/nickanderson/.local/lib/python3.9/site-packages/cfbs/index.py", line 134, in _expand_index
          assert type(thing) in (dict, list, str)
      AssertionError
      

      Ran against cfbs.json from build-index.

        Attachments

          Activity

            People

            Assignee:
            olehermanse Ole Herman Schumacher Elgesem
            Reporter:
            a10042 Nick Anderson
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Dates

              Created:
              Updated: