disconnect() now removes all distributed objects.

This commit is contained in:
Sebastian Hoffmann 2014-04-09 05:45:26 +02:00
parent bf141562d3
commit 8edd5aa4fb
1 changed files with 8 additions and 0 deletions

View File

@ -250,3 +250,11 @@ class AstronClientRepository(ClientRepositoryBase):
def lostConnection(self):
messenger.send("LOST_CONNECTION")
def disconnect(self):
"""
This implicitly deletes all objects from the repository.
"""
for do_id in self.doId2do.keys():
print("Deleting DO "+str(do_id))
self.deleteObject(do_id)
ClientRepositoryBase.disconnect(self)