[py-svn] r38172 - py/trunk/py/execnet

fijal at codespeak.net fijal at codespeak.net
Thu Feb 8 16:54:54 CET 2007


Author: fijal
Date: Thu Feb  8 16:54:53 2007
New Revision: 38172

Modified:
   py/trunk/py/execnet/rsync.py
Log:
Add a method which sends only if there are available targets


Modified: py/trunk/py/execnet/rsync.py
==============================================================================
--- py/trunk/py/execnet/rsync.py	(original)
+++ py/trunk/py/execnet/rsync.py	Thu Feb  8 16:54:53 2007
@@ -93,6 +93,13 @@
         if self._verbose:
             print '%s <= %s' % (gateway.remoteaddress, modified_rel_path)
 
+    def send_if_targets(self):
+        """ Sends only if there are targets, otherwise returns
+        """
+        if not self._channels:
+            return
+        self.send()
+
     def send(self):
         """ Sends a sourcedir to all added targets. 
         """



More information about the pytest-commit mailing list