aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBrian Dolbec <brian.dolbec@gmail.com>2011-02-25 18:46:44 -0800
committerBrian Dolbec <brian.dolbec@gmail.com>2011-03-26 19:39:13 -0700
commit0a82306f384ab032a30cce35513a7a4a7c194991 (patch)
treea53a90cb85c0295359ae386d6dd3246a404ac3c9 /layman/overlays/rsync.py
parentadd being able to set the OptionConfig defaults as well (diff)
downloadlayman-0a82306f384ab032a30cce35513a7a4a7c194991.tar.gz
layman-0a82306f384ab032a30cce35513a7a4a7c194991.tar.bz2
layman-0a82306f384ab032a30cce35513a7a4a7c194991.zip
replace more exception raising with error reporting and proper return values.
some long line cleanup.
Diffstat (limited to 'layman/overlays/rsync.py')
-rw-r--r--layman/overlays/rsync.py13
1 files changed, 8 insertions, 5 deletions
diff --git a/layman/overlays/rsync.py b/layman/overlays/rsync.py
index 1d6e831..76b289e 100644
--- a/layman/overlays/rsync.py
+++ b/layman/overlays/rsync.py
@@ -42,7 +42,8 @@ class RsyncOverlay(OverlaySource):
def __init__(self, parent, config, _location, ignore = 0, quiet = False):
- super(RsyncOverlay, self).__init__(parent, config, _location, ignore, quiet)
+ super(RsyncOverlay, self).__init__(parent, config,
+ _location, ignore, quiet)
def add(self, base, quiet = False):
'''Add overlay.'''
@@ -59,8 +60,9 @@ class RsyncOverlay(OverlaySource):
self.supported()
# rsync OPTIONS [-q] SOURCE TARGET
- args = ['-rlptDvz', '--progress', '--delete', '--delete-after', '--timeout=180',
- '--exclude=distfiles/*', '--exclude=local/*', '--exclude=packages/*']
+ args = ['-rlptDvz', '--progress', '--delete', '--delete-after',
+ '--timeout=180', '--exclude=distfiles/*', '--exclude=local/*',
+ '--exclude=packages/*']
cfg_opts = self.config["rsync_syncopts"]
target = path([base, self.parent.name])
@@ -79,5 +81,6 @@ class RsyncOverlay(OverlaySource):
def supported(self):
'''Overlay type supported?'''
- return require_supported([(self.command(), 'rsync',
- 'net-misc/rsync'),])
+ return require_supported(
+ [(self.command(), 'rsync', 'net-misc/rsync'),],
+ self.output.error)