summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorZeno Albisser <zeno.albisser@digia.com>2014-11-24 13:08:34 +0100
committerZeno Albisser <zeno.albisser@digia.com>2014-12-03 14:01:48 +0100
commit76fa6f7eee2e02bb0c7314c21145bf0ea1371cb0 (patch)
treef1095e9349a7ba1f4ae946253597b03aca866278
parenta46e55ebd85d45665c987258dbe9e0e9f842c849 (diff)
take_snapshot.py should only clear directories.
Specifically we want to keep the file src/3rdparty/.gitattributes. Change-Id: I76f3fe6d6f8b8477834e31a4806f23928a0ca010 Reviewed-by: Andras Becsi <andras.becsi@theqtcompany.com>
-rwxr-xr-xtools/scripts/take_snapshot.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/tools/scripts/take_snapshot.py b/tools/scripts/take_snapshot.py
index 8c5d1604..3b467588 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)