Implemented possibility of specify custom rsync_extra_params to TRsync class
Change-Id: I38493b44f757476ef26cd480056992f5bb9a8c3e
diff --git a/rsync_remote.py b/rsync_remote.py
index 8c46135..0ec4426 100644
--- a/rsync_remote.py
+++ b/rsync_remote.py
@@ -13,14 +13,15 @@
class RsyncRemote(object):
def __init__(self,
rsync_url,
- rsync_extra_params='-v --no-owner --no-group',
+ rsync_extra_params='',
):
# TODO: retry parameters for rsync
self.logger = utils.logger.getChild('RsyncRemote.' + rsync_url)
self.tmp = TempFiles()
self.shell = Shell(self.logger)
self.url = RsyncUrl(rsync_url)
- self.rsync_extra_params = rsync_extra_params
+ self.rsync_extra_params = ' '.join(['-v --no-owner --no-group',
+ rsync_extra_params])
def _rsync_push(self, source='', dest=None, opts='', extra=None):
# TODO: retry for rsync
diff --git a/trsync.py b/trsync.py
index 4fbf347..7e05b62 100644
--- a/trsync.py
+++ b/trsync.py
@@ -18,8 +18,9 @@
save_latest_days=14,
init_directory_structure=True,
timestamp=None,
+ **kwargs
):
- super(TRsync, self).__init__(rsync_url)
+ super(TRsync, self).__init__(rsync_url, **kwargs)
self.logger = utils.logger.getChild('TRsync.' + rsync_url)
self.timestamp = TimeStamp(timestamp)
self.logger.info('Using timestamp {}'.format(self.timestamp))