From 76fa6f7eee2e02bb0c7314c21145bf0ea1371cb0 Mon Sep 17 00:00:00 2001 From: Zeno Albisser Date: Mon, 24 Nov 2014 13:08:34 +0100 Subject: take_snapshot.py should only clear directories. Specifically we want to keep the file src/3rdparty/.gitattributes. Change-Id: I76f3fe6d6f8b8477834e31a4806f23928a0ca010 Reviewed-by: Andras Becsi --- tools/scripts/take_snapshot.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'tools/scripts') diff --git a/tools/scripts/take_snapshot.py b/tools/scripts/take_snapshot.py index 8c5d16044..3b467588f 100755 --- a/tools/scripts/take_snapshot.py +++ b/tools/scripts/take_snapshot.py @@ -256,7 +256,7 @@ def clearDirectory(directory): os.chdir(directory) print 'clearing the directory:' + directory for direntry in os.listdir(directory): - if not direntry == '.git': + if not direntry == '.git' and os.path.isdir(direntry): print 'clearing:' + direntry shutil.rmtree(direntry) os.chdir(currentDir) -- cgit v1.2.3