Commit 73c42144 authored by Grégory Wisniewski's avatar Grégory Wisniewski

Reduce indentation.

git-svn-id: https://svn.erp5.org/repos/neo/trunk@1516 71dcc9de-d417-0410-9af5-da40c76e7ee4
parent 1660dcbe
...@@ -460,34 +460,33 @@ class Application(object): ...@@ -460,34 +460,33 @@ class Application(object):
if self.unfinished_oid_set is None or len(self.unfinished_oid_set) == 0: if self.unfinished_oid_set is None or len(self.unfinished_oid_set) == 0:
# Not commitable. # Not commitable.
return None return None
else: # Verify that all objects are present.
# Verify that all objects are present. for oid in self.unfinished_oid_set:
for oid in self.unfinished_oid_set: self.asking_uuid_dict.clear()
self.asking_uuid_dict.clear() partition = self.pt.getPartition(oid)
partition = self.pt.getPartition(oid) object_uuid_list = [cell.getUUID() for cell \
object_uuid_list = [cell.getUUID() for cell \ in self.pt.getCellList(partition, readable=True)]
in self.pt.getCellList(partition, readable=True)] if len(object_uuid_list) == 0:
if len(object_uuid_list) == 0: raise VerificationFailure
uuid_set.update(object_uuid_list)
self.object_present = True
for conn in em.getConnectionList():
uuid = conn.getUUID()
if uuid in object_uuid_list:
self.asking_uuid_dict[uuid] = False
conn.ask(Packets.AskObjectPresent(oid, tid))
while True:
em.poll(1)
if not self.pt.operational():
raise VerificationFailure raise VerificationFailure
uuid_set.update(object_uuid_list) if False not in self.asking_uuid_dict.values():
break
self.object_present = True if not self.object_present:
for conn in em.getConnectionList(): # Not commitable.
uuid = conn.getUUID() return None
if uuid in object_uuid_list:
self.asking_uuid_dict[uuid] = False
conn.ask(Packets.AskObjectPresent(oid, tid))
while True:
em.poll(1)
if not self.pt.operational():
raise VerificationFailure
if False not in self.asking_uuid_dict.values():
break
if not self.object_present:
# Not commitable.
return None
return uuid_set return uuid_set
......
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