Skip to content

While running msak export --networks "<network name>", the script crashes with: #1

@AGreatSquirrel

Description

@AGreatSquirrel

https://github.com/ciscops/msak/blame/2d14dfe474579c26879616b05e44a6d4b9489a71/msak#L1235

Steps to reproduce

  1. Set up API env vars
  2. Run the export command on network: msak export --networks "network-name" -o output.json
  3. Script fails at line 1235

if path in config["api_path_exlude"]:

It looks like config is either never defined or not passed properly

Wrap the line with a safe check:
if "config" in globals() and path in config.get("api_path_exlude", []):

^^^This allowed me to successfully run the command in my case^^^

Happy to test a fix or provide more context if needed. Thanks for building this awesome tool!

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions