From 137dc73fc7faba5a182695f2ed3004827b81a800 Mon Sep 17 00:00:00 2001 From: Mathias Klette Date: Thu, 29 Sep 2011 12:29:41 +0200 Subject: [PATCH] change logger output for cleanup function --- lib/git_helper.py | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) 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 -- 2.39.5