Commit c2ce500f authored by Cédric Le Ninivin's avatar Cédric Le Ninivin

slapos_jio_api_style: request Software Instance return Software instance if it exists

parent d0493c26
...@@ -89,13 +89,9 @@ try: ...@@ -89,13 +89,9 @@ try:
.getRelativeUrl() .getRelativeUrl()
requester.setLastData(value, key=key) requester.setLastData(value, key=key)
if requested_software_instance is None: if requested_software_instance is not None:
raise SoftwareInstanceNotReady
else:
if not requested_software_instance.getAggregate(portal_type="Compute Partition"):
raise SoftwareInstanceNotReady
else:
return requested_software_instance.asJSONText() return requested_software_instance.asJSONText()
raise SoftwareInstanceNotReady
except SoftwareInstanceNotReady: except SoftwareInstanceNotReady:
return logError( return logError(
"Software Instance Not Ready", "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