From f7d90041b00c98c07a586a31fcdfbba1ae9422fb Mon Sep 17 00:00:00 2001 From: "phoglund@webrtc.org" Date: Thu, 15 Mar 2012 11:03:02 +0000 Subject: [PATCH] Fixed annoying printouts polluting the cron logs. BUG= TEST= Review URL: https://webrtc-codereview.appspot.com/447006 git-svn-id: http://webrtc.googlecode.com/svn/trunk@1892 4adac7df-926f-26a2-2b94-8c16560cd09d --- tools/continuous_build/clean_old_files.py | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/tools/continuous_build/clean_old_files.py b/tools/continuous_build/clean_old_files.py index e87526edcf..94e210aa7a 100755 --- a/tools/continuous_build/clean_old_files.py +++ b/tools/continuous_build/clean_old_files.py @@ -47,8 +47,11 @@ def delete_directory(directory): os.rmdir(directory) return True except OSError as exception: - # The directory probably contains newer files. - print "Could not remove directory %s: reason %s." % (directory, exception) + if "not empty" in str(exception): + # This is normal, ignore it + pass + else: + print "Could not remove directory %s: reason %s." % (directory, exception) return False