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

Fixes #1312 Fixed IndexError in tomof() of some CIM objects on empty array value #1313

Merged
merged 1 commit into from
Jul 20, 2018

Conversation

andy-maier
Copy link
Contributor

Ready for review and merge.

@coveralls
Copy link

coveralls commented Jul 20, 2018

Coverage Status

Coverage increased (+0.01%) to 84.308% when pulling ab3a8d2 on andy/#1312-fix-tomof-empty-array into 0096714 on master.

… on empty array value

Details:

* Fixed the issue where `CIMInstance.tomof()` raised `IndexError` when it
  contains an array property whose value is the empty array. This would
  also happen in `CIMProperty.tomof(is_instance=True,...)` on an empty array
  value.
  The value of the empty array is represented as an empty string, and this is
  now checked before accessing it.

* Extended fix to also cover CIMQUalifier and CIMQUalifierDeclaration.

* Added according testcases to test_cim_obj.py.

Signed-off-by: Andreas Maier <andreas.r.maier@gmx.de>
@andy-maier andy-maier force-pushed the andy/#1312-fix-tomof-empty-array branch from ede2422 to ab3a8d2 Compare July 20, 2018 10:30
@andy-maier andy-maier changed the title Fixes #1312 Fixed IndexError in CIMInstance.tomof() on empty array property Fixes #1312 Fixed IndexError in tomof() of some CIM objects on empty array value Jul 20, 2018
@andy-maier andy-maier merged commit 2e99fa4 into master Jul 20, 2018
@andy-maier andy-maier deleted the andy/#1312-fix-tomof-empty-array branch July 20, 2018 13:09
@andy-maier andy-maier added the roll back/forward done Roll back or roll forward has been done label Sep 5, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
roll back/forward done Roll back or roll forward has been done
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants