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

0.12: Fixed IndexError in tomof() of some CIM objects on empty array value #1314

Merged
merged 1 commit into from
Jul 20, 2018

Conversation

andy-maier
Copy link
Contributor

This PR rolls back PR #1313 into pywbem 0.12.

@coveralls
Copy link

coveralls commented Jul 20, 2018

Coverage Status

Coverage increased (+0.01%) to 82.221% when pulling 5f7cdfe on andy/0.12/#1312-fix-tomof-empty-array into 3d356ec on stable_0.12.

… 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/0.12/#1312-fix-tomof-empty-array branch from 10bc97f to 5f7cdfe Compare July 20, 2018 10:29
@andy-maier andy-maier changed the title 0.12: Fixed IndexError in CIMInstance.tomof() on empty array property 0.12: Fixed IndexError in tomof() of some CIM objects on empty array value Jul 20, 2018
@andy-maier andy-maier merged commit a0b8857 into stable_0.12 Jul 20, 2018
@andy-maier andy-maier deleted the andy/0.12/#1312-fix-tomof-empty-array branch July 20, 2018 13:08
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

3 participants