slaplib: Avoid connecting to SlapOS Master if no _computer_id is defined

parent f0bb2209
......@@ -319,6 +319,9 @@ def _syncComputerPartitionInformation(func):
def decorated(self, *args, **kw):
if getattr(self, '_synced', 0):
return func(self, *args, **kw)
if not self._computer_id:
# XXX Is it only in case of requesting instance?
raise ResourceNotReady("Intance is not ready yet.")
# XXX: This is a ugly way to keep backward compatibility,
# We should stablise slap library soon.
computer = self._connection_helper.getFullComputerInformation(self._computer_id)
......
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