From 0ed777e86bd4e2083382572ebc2932d239cef2b9 Mon Sep 17 00:00:00 2001 From: brent s Date: Thu, 19 Apr 2018 01:18:19 -0400 Subject: [PATCH] stop emailing me because of a temporary rsync error --- centos/repoclone/repoclone.py | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/centos/repoclone/repoclone.py b/centos/repoclone/repoclone.py index be7a529..56846a8 100755 --- a/centos/repoclone/repoclone.py +++ b/centos/repoclone/repoclone.py @@ -264,10 +264,13 @@ class MirrorMgr(object): if chk == 0: _open = True break - if not _open: - raise RuntimeError(('Rsync on host {0}:{1} is not ' + - 'accessible!').format(_split_srv[0], - _port)) + if os.isatty(sys.stdin.fileno()): + if not _open: + raise RuntimeError(('Rsync on host {0}:{1} is not ' + + 'accessible!').format(_split_srv[0], + _port)) + else: + exit() return() def chkdest(): _dest = os.path.abspath(