File tree Expand file tree Collapse file tree 1 file changed +5
-3
lines changed Expand file tree Collapse file tree 1 file changed +5
-3
lines changed Original file line number Diff line number Diff line change @@ -220,13 +220,15 @@ def introspect(self):
220
220
funcs [k ]= v
221
221
return funcs
222
222
223
- def introspect_constants (value = None , prefix = None ):
223
+ def introspect_constants (self , value = None , prefix = None ):
224
224
'''
225
225
Returns constants names / values, given a value and/or a name filter (regex)
226
226
Example, introspect_constants(1, "XCCDF_RESULT") returns {XCCDF_RESULT_PASS: 1}
227
+
228
+ !!! constants are here designated by C enums (=> numeric value)
227
229
'''
228
- return {k : v for k , v in points .items () if (value is None or v == value ) and
229
- (prefix is None or k .startswith (prefix ))}
230
+ return {k : v for k , v in OSCAP . __dict__ .items () if (value is None or v == value ) and
231
+ (isinstance ( v , int )) and ( prefix is None or k .startswith (prefix ))}
230
232
231
233
def __getattr__ (self , name ):
232
234
""" Called when an attribute lookup has not found the attribute in the usual places (i.e.
You can’t perform that action at this time.
0 commit comments