From ac1886e46b24f1db612070e9414e566c1d919fb0 Mon Sep 17 00:00:00 2001 From: brent s Date: Thu, 18 Jun 2020 12:45:08 -0400 Subject: [PATCH] better rsync logging --- repomirror/fetcher/rsync.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/repomirror/fetcher/rsync.py b/repomirror/fetcher/rsync.py index 3ec3b74..dd87cc1 100644 --- a/repomirror/fetcher/rsync.py +++ b/repomirror/fetcher/rsync.py @@ -72,7 +72,7 @@ class RSync(_base.BaseFetcher): if stderr != '' or cmd.returncode != 0: _logger.error('Rsync to {0}:{1} returned exit status {2}'.format(self.domain, self.port, cmd.returncode)) _logger.debug('STDERR: {0}'.format(stderr)) - warnings.warn('Rsync process returned non-zero') + warnings.warn('Rsync process returned non-zero ({0}) for {1}'.format(cmd.returncode, ' '.join(cmd_str))) return(None) def fetch_content(self, remote_filepath): @@ -93,7 +93,7 @@ class RSync(_base.BaseFetcher): if stderr != '' or cmd.returncode != 0: _logger.error('Rsync to {0}:{1} returned exit status {2}'.format(self.domain, self.port, cmd.returncode)) _logger.debug('STDERR: {0}'.format(stderr)) - warnings.warn('Rsync process returned non-zero') + warnings.warn('Rsync process returned non-zero ({0}) for {1}'.format(cmd.returncode, ' '.join(cmd_str))) with open(tf, 'rb') as fh: raw_content = fh.read() os.remove(tf)