Skip to content

Commit

Permalink
Replaced TODOs in cim_obj.py with Notes.
Browse files Browse the repository at this point in the history
Details:

- One group of TODOs was removed that was about removing a note
  about what pywbem assumes for a missing definition in DSP0004.
  Because it is not expected that there is an update of DSP0004
  in the near future, we don't want to get bothered by the TODO,
  and think the note is sufficient.

- A second TODO was changedinto a note: The tocimobj() function
  has a limitation to not support nested double quoting. because
  we want to transition all uses of tocimobj() to use cimvalue(),
  we will not lift this limitation, and so the TODO has been
  changed into a note pointing out the limitation.

Signed-off-by: Andreas Maier <maiera@de.ibm.com>
  • Loading branch information
andy-maier committed Jan 19, 2018
1 parent 8b7e076 commit 6d64940
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions pywbem/cim_obj.py
Original file line number Diff line number Diff line change
Expand Up @@ -1935,12 +1935,10 @@ def _kbstr_to_cimval(key, val):
# Note: The actual definition of referenceValue is missing in
# DSP0207, see issue #929. Pywbem implements:
# referenceValue = WBEM-URI-UntypedInstancePath.
# TODO 01/18 AM Remove note once referenceValue is def'd in DSP0207

# Note: The definition of stringValue in DSP0004 allows multiple
# quoted parts (as in MOF), see issue #931. Pywbem implements only
# a single quoted part.
# TODO 01/18 AM Remove note once stringValue is fixed in DSP0207

# We use slicing instead of strip() for removing the surrounding
# double quotes, because there could be an escaped double quote
Expand Down Expand Up @@ -1972,7 +1970,6 @@ def _kbstr_to_cimval(key, val):
# Note: The definition of charValue in DSP0004 allows for integer
# numbers in addition to single quoted strings, see issue #932.
# Pywbem implements only single quoted strings.
# TODO 01/18 AM Remove note once charValue is fixed in DSP0207

cimval = val[1:-1]
cimval = re.sub(r'\\(.)', r'\1', cimval)
Expand Down Expand Up @@ -7110,7 +7107,8 @@ def tocimobj(type_, value):

if type_ == 'reference': # pylint: disable=too-many-nested-blocks
# pylint: disable=too-many-return-statements,too-many-branches
# TODO doesn't handle double-quoting, as in refs to refs. Example:

# Note: This doesn't handle double-quoting, as in refs to refs. Example:
# r'ex_composedof.composer="ex_sampleClass.label1=9921,' +
# 'label2=\"SampleLabel\"",component="ex_sampleClass.label1=0121,' +
# 'label2=\"Component\""')
Expand Down

0 comments on commit 6d64940

Please sign in to comment.