[svn r38040] My favorite lazy-lexical-scope-binding error. Still thinking how to make test
for that. Basically - callbacks with lexical scope variables are usually (depends of coz) called with variables after the for loop has finished. --HG-- branch : trunk
This commit is contained in:
parent
3fa9cbe98d
commit
b91e13d5df
|
@ -133,10 +133,11 @@ class HostManager(object):
|
|||
verbose=self.config.option.verbose)
|
||||
destrelpath = root.relto(self.config.topdir)
|
||||
for host in self.hosts:
|
||||
def donecallback():
|
||||
def donecallback(host, root):
|
||||
reporter(repevent.HostRSyncRootReady(host, root))
|
||||
remotepath = rsync.add_target_host(
|
||||
host, reporter, destrelpath, finishedcallback=donecallback)
|
||||
host, reporter, destrelpath, finishedcallback=
|
||||
lambda host=host, root=root: donecallback(host, root))
|
||||
reporter(repevent.HostRSyncing(host, root, remotepath))
|
||||
rsync.send(root)
|
||||
|
||||
|
|
Loading…
Reference in New Issue