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

Register description is not mandatory #25

Merged
merged 2 commits into from
Apr 9, 2021
Merged

Register description is not mandatory #25

merged 2 commits into from
Apr 9, 2021

Conversation

vermaete
Copy link
Collaborator

@vermaete vermaete commented Apr 7, 2021

Hi Andreas,

I had a register without description and the python code failed on it.
The XML itself was valid. A description of a registers seems to be not needed in IP-XACT.

I've modified one of your test registers so it does not have a description.
And modified the Python code if there is no description element, it will add an empty string as description.
This makes it a bit easier to maintain the code. And I prefer having a 'Description:' line in the documentation so that
it's clear it's better to add a description.

Thanks for reviewing.

However, the python code was failing when there is no description.
To avoid having to catch at a lot of places in the Python code where
there is no variable reg.desc, I assign an empty string during the parsing
step if not description XML element is there.

I've modified the test input to have one without description.

Signed-off-by: Jan Vermaete <jan.vermaete@gmail.com>
Signed-off-by: Jan Vermaete <jan.vermaete@gmail.com>
@oddball
Copy link
Owner

oddball commented Apr 9, 2021

LGTM

@oddball oddball merged commit 992d257 into oddball:master Apr 9, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants