parent
							
								
									e4f5a2259c
								
							
						
					
					
						commit
						beb3a12700
					
				| 
						 | 
					@ -19,6 +19,7 @@ class RSync(object):
 | 
				
			||||||
        for name in options:
 | 
					        for name in options:
 | 
				
			||||||
            assert name in ('delete')
 | 
					            assert name in ('delete')
 | 
				
			||||||
        self._options = options
 | 
					        self._options = options
 | 
				
			||||||
 | 
					        assert callback is None or callable(callback)
 | 
				
			||||||
        self._callback = callback
 | 
					        self._callback = callback
 | 
				
			||||||
        self._channels = {}
 | 
					        self._channels = {}
 | 
				
			||||||
        self._receivequeue = Queue()
 | 
					        self._receivequeue = Queue()
 | 
				
			||||||
| 
						 | 
					@ -31,6 +32,7 @@ class RSync(object):
 | 
				
			||||||
        """ Adds a remote target specified via a 'gateway'
 | 
					        """ Adds a remote target specified via a 'gateway'
 | 
				
			||||||
            and a remote destination directory. 
 | 
					            and a remote destination directory. 
 | 
				
			||||||
        """
 | 
					        """
 | 
				
			||||||
 | 
					        assert finishedcallback is None or callable(finishedcallback)
 | 
				
			||||||
        def itemcallback(req):
 | 
					        def itemcallback(req):
 | 
				
			||||||
            self._receivequeue.put((channel, req))
 | 
					            self._receivequeue.put((channel, req))
 | 
				
			||||||
        channel = gateway.remote_exec(REMOTE_SOURCE)
 | 
					        channel = gateway.remote_exec(REMOTE_SOURCE)
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -87,6 +87,7 @@ def test_file_disappearing():
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    class DRsync(RSync):
 | 
					    class DRsync(RSync):
 | 
				
			||||||
        def filter(self, x):
 | 
					        def filter(self, x):
 | 
				
			||||||
 | 
					            assert x != source
 | 
				
			||||||
            if x.endswith("ex2"):
 | 
					            if x.endswith("ex2"):
 | 
				
			||||||
                self.x = 1
 | 
					                self.x = 1
 | 
				
			||||||
                source.join("ex2").remove()
 | 
					                source.join("ex2").remove()
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
		Loading…
	
		Reference in New Issue