From: Mathias Klette Date: Thu, 29 Sep 2011 10:29:41 +0000 (+0200) Subject: change logger output for cleanup function X-Git-Url: https://git.uhu-banane.de/?a=commitdiff_plain;h=137dc73fc7faba5a182695f2ed3004827b81a800;p=profitbricks%2Fjenkins-build-scripts.git change logger output for cleanup function --- diff --git a/lib/git_helper.py b/lib/git_helper.py index fac1e3e..1fed691 100644 --- a/lib/git_helper.py +++ b/lib/git_helper.py @@ -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