@@ -316,7 +316,7 @@ class ENCODED_VALUE(Structure):
316
316
def getValue (cls , cimType , entry , heap ):
317
317
# Let's get the default Values
318
318
pType = cimType & (~ (CIM_ARRAY_FLAG | Inherited ))
319
-
319
+ cimType = cimType & ( ~ Inherited )
320
320
if entry != 0xffffffff :
321
321
heapData = heap [entry :]
322
322
if cimType & CIM_ARRAY_FLAG :
@@ -926,9 +926,10 @@ def printClass(self, pClass, cInstance = None):
926
926
print ('\t [%s(%s)]' % (qName , qualifiers [qName ]))
927
927
print ("\t %s %s" % (properties [pName ]['stype' ], properties [pName ]['name' ]), end = ' ' )
928
928
if properties [pName ]['value' ] is not None :
929
- if properties [pName ]['type' ] == CIM_TYPE_ENUM .CIM_TYPE_OBJECT .value :
929
+ cimType = properties [pName ]['type' ] & (~ Inherited )
930
+ if cimType == CIM_TYPE_ENUM .CIM_TYPE_OBJECT .value :
930
931
print ('= IWbemClassObject\n ' )
931
- elif properties [ pName ][ 'type' ] == CIM_TYPE_ENUM .CIM_ARRAY_OBJECT .value :
932
+ elif cimType == CIM_TYPE_ENUM .CIM_ARRAY_OBJECT .value :
932
933
if properties [pName ]['value' ] == 0 :
933
934
print ('= %s\n ' % properties [pName ]['value' ])
934
935
else :
@@ -2613,7 +2614,8 @@ def SpawnInstance(self):
2613
2614
def createProperties (self , properties ):
2614
2615
for property in properties :
2615
2616
# Do we have an object property?
2616
- if properties [property ]['type' ] == CIM_TYPE_ENUM .CIM_TYPE_OBJECT .value and properties [property ]['value' ] != None :
2617
+ cimType = properties [property ]['type' ] & (~ Inherited )
2618
+ if cimType == CIM_TYPE_ENUM .CIM_TYPE_OBJECT .value and properties [property ]['value' ] != None :
2617
2619
# Yes.. let's create an Object for it too
2618
2620
objRef = OBJREF_CUSTOM ()
2619
2621
objRef ['iid' ] = self ._iid
@@ -2623,7 +2625,7 @@ def createProperties(self, properties):
2623
2625
objRef ['pObjectData' ] = properties [property ]['value' ]
2624
2626
value = IWbemClassObject ( INTERFACE (self .get_cinstance (), objRef .getData (), self .get_ipidRemUnknown (),
2625
2627
oxid = self .get_oxid (), target = self .get_target ()))
2626
- elif properties [ property ][ 'type' ] == CIM_TYPE_ENUM .CIM_ARRAY_OBJECT .value :
2628
+ elif cimType == CIM_TYPE_ENUM .CIM_ARRAY_OBJECT .value :
2627
2629
if isinstance (properties [property ]['value' ], list ):
2628
2630
value = list ()
2629
2631
for item in properties [property ]['value' ]:
0 commit comments