We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent d6d0068 commit 27d1008Copy full SHA for 27d1008
swig/openscap_api.py
@@ -321,8 +321,10 @@ def free(self):
321
def __start_callback(self, rule, obj):
322
return obj[0](OSCAP_Object("xccdf_rule", rule), obj[1])
323
324
- def __output_callback(self, rule_result, obj):
325
- return obj[0](OSCAP_Object("xccdf_rule_result", rule_result), obj[1])
+ def __output_callback(self, result, obj):
+ # the returned object can be a rule_result or an oval_definition_result, so I extract the right name from the object repr.
326
+ structure = re.findall(r"type '(struct )?(\b\S*\b)", result.__repr__())[0][1]
327
+ return obj[0](OSCAP_Object(structure, rule_result), obj[1])
328
329
def register_start_callback(self, cb, usr):
330
if self.object != "xccdf_policy_model":
0 commit comments