MutableFileNode.modify: pass first_time= and servermap= to the modifier callback

This commit is contained in:
Brian Warner
2008-12-05 22:07:10 -07:00
parent 6ec352fe92
commit fb9af2c7a0
5 changed files with 31 additions and 27 deletions

View File

@ -24,7 +24,7 @@ class Deleter:
self.node = node
self.name = name
self.must_exist = True
def modify(self, old_contents):
def modify(self, old_contents, servermap, first_time):
children = self.node._unpack_contents(old_contents)
if self.name not in children:
if self.must_exist:
@ -42,7 +42,7 @@ class MetadataSetter:
self.name = name
self.metadata = metadata
def modify(self, old_contents):
def modify(self, old_contents, servermap, first_time):
children = self.node._unpack_contents(old_contents)
if self.name not in children:
raise NoSuchChildError(self.name)
@ -62,7 +62,7 @@ class Adder:
def set_node(self, name, node, metadata):
self.entries.append( [name, node, metadata] )
def modify(self, old_contents):
def modify(self, old_contents, servermap, first_time):
children = self.node._unpack_contents(old_contents)
now = time.time()
for e in self.entries: