Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Bug: Add to_dict to RootLinterResult #34

Open
FragmentedPacket opened this issue Feb 19, 2020 · 0 comments
Open

Bug: Add to_dict to RootLinterResult #34

FragmentedPacket opened this issue Feb 19, 2020 · 0 comments
Labels
bug Something isn't working PR Required

Comments

@FragmentedPacket
Copy link
Contributor

https://github.com/networktocode/yangify/blob/develop/yangify/linter/__init__.py#L167

Add to_dict method to RootLinterResult so it can be used within the NTC Rosetta CLI tools as well as any other tool/use that may want it.

Below is the link to the code in NTC Rosetta that uses it and then errors out:
https://github.com/networktocode/ntc-rosetta/blob/develop/ntc_rosetta/cli/print_processor.py#L32

Error:

File "/src/.venvs/ansible/lib64/python3.6/site-packages/ntc_rosetta/cli/print_processor.py", line 32, in print_parser
    text = json.dumps(lint.to_dict(), indent=4)
AttributeError: 'RootLinterResult' object has no attribute 'to_dict'
@FragmentedPacket FragmentedPacket added bug Something isn't working PR Required labels Feb 19, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working PR Required
Projects
None yet
Development

No branches or pull requests

1 participant