diff options
author | Luke Shumaker <LukeShu@sbcglobal.net> | 2013-07-14 15:07:59 -0600 |
---|---|---|
committer | Luke Shumaker <LukeShu@sbcglobal.net> | 2013-07-14 15:07:59 -0600 |
commit | d10acd3ebf889fc50054b4da9c1962bad79533e1 (patch) | |
tree | 38970704a658d9ed31585c5518007d48ade6bac6 /mirrors/management/commands/mirrorcheck.py | |
parent | 9b6561a2c1a99023a5cad68a1763a07c4aecae8d (diff) | |
parent | 7f7598cf43e6b630ac21bc9a435773773213ea60 (diff) |
Merge branch 'archweb-generic2'
Conflicts:
Makefile
templates/public/index.html
Diffstat (limited to 'mirrors/management/commands/mirrorcheck.py')
-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 |