summaryrefslogtreecommitdiffstats
path: root/mirrors/management
diff options
context:
space:
mode:
authorDan McGee <dan@archlinux.org>2013-03-07 04:38:58 +0100
committerDan McGee <dan@archlinux.org>2013-03-07 04:38:58 +0100
commitace95f6e53f41409568d4e4f1cf4c2a69d931e2c (patch)
tree395f07b6f619994e1ccec14e1e1a2234c9ad8a14 /mirrors/management
parent7c8b09b95ce5db9ddf7e895c2722bd202f5c4f54 (diff)
downloadarchweb-ace95f6e53f41409568d4e4f1cf4c2a69d931e2c.tar.gz
archweb-ace95f6e53f41409568d4e4f1cf4c2a69d931e2c.tar.xz
Don't add blank options to rsync command line
Rsync doesn't like this so much: Unexpected remote arg: rsync://mirror.example.com/archlinux/lastsync rsync error: syntax or usage error (code 1) at main.c(1214) [sender=3.0.9] Signed-off-by: Dan McGee <dan@archlinux.org>
Diffstat (limited to 'mirrors/management')
-rw-r--r--mirrors/management/commands/mirrorcheck.py6
1 files changed, 5 insertions, 1 deletions
diff --git a/mirrors/management/commands/mirrorcheck.py b/mirrors/management/commands/mirrorcheck.py
index f133c78..1315a01 100644
--- a/mirrors/management/commands/mirrorcheck.py
+++ b/mirrors/management/commands/mirrorcheck.py
@@ -169,7 +169,11 @@ def check_rsync_url(mirror_url, location, timeout):
ipopt = '--ipv4'
lastsync_path = os.path.join(tempdir, 'lastsync')
rsync_cmd = ["rsync", "--quiet", "--contimeout=%d" % timeout,
- "--timeout=%d" % timeout, ipopt, url, lastsync_path]
+ "--timeout=%d" % timeout]
+ if ipopt:
+ rsync_cmd.append(ipopt)
+ rsync_cmd.append(url)
+ rsync_cmd.append(lastsync_path)
try:
with open(os.devnull, 'w') as devnull:
logger.debug("rsync cmd: %s", ' '.join(rsync_cmd))