diff options
author | Luke Shumaker <LukeShu@sbcglobal.net> | 2013-07-14 12:08:36 -0600 |
---|---|---|
committer | Luke Shumaker <LukeShu@sbcglobal.net> | 2013-07-14 12:08:36 -0600 |
commit | f6b335b268f5f47e5c48f84f5994f7bdcd8b7e5a (patch) | |
tree | 5f7c5ea574a88a4bc1d825e0c7ea829ddedbf9aa /mirrors/management/commands | |
parent | 0aa246b85159bf627873308868cf169868cba569 (diff) | |
parent | ffaa2cfb254a238ba0eb704115b95360305d1ae7 (diff) |
Merge branch 'archweb' into archweb-generic2
Diffstat (limited to 'mirrors/management/commands')
-rw-r--r-- | mirrors/management/commands/mirrorcheck.py | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/mirrors/management/commands/mirrorcheck.py b/mirrors/management/commands/mirrorcheck.py index 6faf294a..3f026c36 100644 --- a/mirrors/management/commands/mirrorcheck.py +++ b/mirrors/management/commands/mirrorcheck.py @@ -179,10 +179,11 @@ def check_rsync_url(mirror_url, location, timeout): rsync_cmd.append(lastsync_path) try: with open(os.devnull, 'w') as devnull: - logger.debug("rsync cmd: %s", ' '.join(rsync_cmd)) + if logger.isEnabledFor(logging.DEBUG): + logger.debug("rsync cmd: %s", ' '.join(rsync_cmd)) + start = time.time() proc = subprocess.Popen(rsync_cmd, stdout=devnull, stderr=subprocess.PIPE) - start = time.time() _, errdata = proc.communicate() end = time.time() log.duration = end - start |