Raise NotReady when _requested_state doesn't exist when trying to fetch it from getter.

parent f7ae867a
......@@ -517,6 +517,9 @@ class ComputerPartition(SlapDocument):
@_syncComputerPartitionInformation
def getState(self):
"""Sync if not synced, then returns _requested_state."""
if not getattr(self, '_requested_state', None):
raise ResourceNotReady()
return self._requested_state
@_syncComputerPartitionInformation
......
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