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 149785d commit d6d0068Copy full SHA for d6d0068
swig/openscap_api.py
@@ -138,7 +138,8 @@ def new(retobj):
138
if type(retobj).__name__ in ('SwigPyObject', 'PySwigObject'):
139
# Extract the name of structure from the representation of the object
140
# "<Swig Object of type 'struct xccdf_result_iterator *' at 0x7f8f65fc1390>"
141
- structure = re.findall(r"type 'struct (\b\S*\b)", retobj.__repr__())[0]
+ # or "<Swig Object of type 'oval_agent_session_t *' at 0x7f9aa2cdf360>"
142
+ structure = re.findall(r"type '(struct )?(\b\S*\b)", retobj.__repr__())[0][1]
143
return OSCAP_Object(structure, retobj)
144
else:
145
return retobj
0 commit comments