Commit b8d323f5 authored by Cédric Le Ninivin's avatar Cédric Le Ninivin Committed by Cédric Le Ninivin

slapos_jio_api_style: request Software Instance return Software instance if it exists

parent e320efef
......@@ -89,13 +89,9 @@ try:
.getRelativeUrl()
requester.setLastData(value, key=key)
if requested_software_instance is None:
raise SoftwareInstanceNotReady
else:
if not requested_software_instance.getAggregate(portal_type="Compute Partition"):
raise SoftwareInstanceNotReady
else:
return requested_software_instance.asJSONText()
if requested_software_instance is not None:
return requested_software_instance.asJSONText()
raise SoftwareInstanceNotReady
except SoftwareInstanceNotReady:
return logError(
"Software Instance Not Ready",
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment