[svn r38172] Add a method which sends only if there are available targets

--HG--
branch : trunk
This commit is contained in:
fijal 2007-02-08 16:54:53 +01:00
parent 395d97160c
commit 120dae7749
1 changed files with 7 additions and 0 deletions

View File

@ -93,6 +93,13 @@ class RSync(object):
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.
"""