Commit 45de1258 authored by Rafael Monnerat's avatar Rafael Monnerat

agent: Handle not found Software Installation

  In distribution systems, it is possible that master didn't indexed the Software Installation
  when we check, this change will consider we don't know the state of the Software Installation on
  this stage. The code will retry later anyway.
parent 80004530
......@@ -157,10 +157,15 @@ class SlapOSMasterCommunicator(object):
@retryOnNetworkFailure
def getSoftwareInstallationNews(self):
getter_link = None
for si in self.getSoftwareInstallationList():
if si["title"] == self.url:
getter_link = si["href"]
break
# We could not find the document, so it is probably too soon.
if getter_link is None:
return ""
result = self.hateoas_navigator.GET(getter_link)
action_object_slap_list = json.loads(result)['_links']['action_object_slap']
......
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