]> Frank Brehm's Git Trees - profitbricks/jenkins-build-scripts.git/commitdiff
change logger output for cleanup function
authorMathias Klette <mathias.klette@profitbricks.com>
Thu, 29 Sep 2011 10:29:41 +0000 (12:29 +0200)
committerMathias Klette <mathias.klette@profitbricks.com>
Thu, 29 Sep 2011 10:29:41 +0000 (12:29 +0200)
lib/git_helper.py

index fac1e3e8d6ccae6937c762d996c4a0381ccc81e2..1fed6910715e3ffa6ed35e0fe43196d07530292b 100644 (file)
@@ -177,8 +177,8 @@ def git_cleanup_branch(paths):
     for path in paths:
         try:
             if not os.path.exists(path):
-                logger.info(
-                    'Cleanup of %s impossible: Not existing'
+                logger.debug(
+                    'Cleanup not neccessary: %s not found'
                     %(path)
                 )
                 continue
@@ -189,13 +189,13 @@ def git_cleanup_branch(paths):
                 cmd=os.unlink
             else:
                 raise Exception(
-                    'Cleanup of %s impossible: Unknown file type'
+                    'Cleanup not necessary: %s has unknown file type'
                     %(path)
                 )
                 continue
     
             logger.debug(
-                'Trying to remove %s'
+                'Cleanup necessary: %s found'
                 %(path)
             )
             cmd(path)
@@ -203,6 +203,10 @@ def git_cleanup_branch(paths):
             result["bads"].setdefault(path, error)
         else:
             result["goods"].setdefault(path, True)
+            logger.info(
+                'Cleanup: %s removed'
+                %(path)
+            )
     return result