summaryrefslogtreecommitdiff
path: root/mirrors/management/commands
diff options
context:
space:
mode:
authorDan McGee <dan@archlinux.org>2013-03-06 21:38:58 -0600
committerDan McGee <dan@archlinux.org>2013-03-06 21:38:58 -0600
commitace95f6e53f41409568d4e4f1cf4c2a69d931e2c (patch)
tree395f07b6f619994e1ccec14e1e1a2234c9ad8a14 /mirrors/management/commands
parent7c8b09b95ce5db9ddf7e895c2722bd202f5c4f54 (diff)
Don't add blank options to rsync command linerelease_2013-03-06
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/commands')
-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 f133c785..1315a013 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))