subversion-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From hwri...@apache.org
Subject svn commit: r1297725 - /subversion/trunk/subversion/tests/cmdline/svntest/sandbox.py
Date Tue, 06 Mar 2012 21:18:38 GMT
Author: hwright
Date: Tue Mar  6 21:18:37 2012
New Revision: 1297725

URL: http://svn.apache.org/viewvc?rev=1297725&view=rev
Log:
Followup to r1297676 by using the logger in the sandbox module of the tests.

* subversion/tests/cmdline/svntest/sandbox.py
  (_cleanup_test_path): Use the logger, rather than directly printing to stdout.

Modified:
    subversion/trunk/subversion/tests/cmdline/svntest/sandbox.py

Modified: subversion/trunk/subversion/tests/cmdline/svntest/sandbox.py
URL: http://svn.apache.org/viewvc/subversion/trunk/subversion/tests/cmdline/svntest/sandbox.py?rev=1297725&r1=1297724&r2=1297725&view=diff
==============================================================================
--- subversion/trunk/subversion/tests/cmdline/svntest/sandbox.py (original)
+++ subversion/trunk/subversion/tests/cmdline/svntest/sandbox.py Tue Mar  6 21:18:37 2012
@@ -25,9 +25,12 @@ import os
 import shutil
 import copy
 import urllib
+import logging
 
 import svntest
 
+logger = logging.getLogger('svntest')
+
 
 class Sandbox:
   """Manages a sandbox (one or more repository/working copy pairs) for
@@ -307,14 +310,13 @@ def cleanup_deferred_test_paths():
 
 
 def _cleanup_test_path(path, retrying=False):
-  if svntest.main.options.verbose:
-    if retrying:
-      print("CLEANUP: RETRY: %s" % path)
-    else:
-      print("CLEANUP: %s" % path)
+  if retrying:
+    logger.info("CLEANUP: RETRY: %s", path)
+  else:
+    logger.info("CLEANUP: %s", path)
+
   try:
     svntest.main.safe_rmtree(path)
   except:
-    if svntest.main.options.verbose:
-      print("WARNING: cleanup failed, will try again later")
+    logger.info("WARNING: cleanup failed, will try again later")
     _deferred_test_paths.append(path)



Mime
View raw message