summaryrefslogtreecommitdiff
path: root/cpp/config/IceGridAdmin.py
diff options
context:
space:
mode:
authorMatthew Newhook <matthew@zeroc.com>2006-06-14 17:46:16 +0000
committerMatthew Newhook <matthew@zeroc.com>2006-06-14 17:46:16 +0000
commit94510289c3b7be3549c86fda7ed7c906881c7ab3 (patch)
tree286acac90c9f97825653991948d2457647e449aa /cpp/config/IceGridAdmin.py
parentupdates to the test harness. Fixed a bug with cleanDb in IceGridAdmin.py. (diff)
downloadice-94510289c3b7be3549c86fda7ed7c906881c7ab3.tar.bz2
ice-94510289c3b7be3549c86fda7ed7c906881c7ab3.tar.xz
ice-94510289c3b7be3549c86fda7ed7c906881c7ab3.zip
Fixed a bug with cleanDb in IceGridAdmin.py.
Diffstat (limited to 'cpp/config/IceGridAdmin.py')
-rw-r--r--cpp/config/IceGridAdmin.py22
1 files changed, 7 insertions, 15 deletions
diff --git a/cpp/config/IceGridAdmin.py b/cpp/config/IceGridAdmin.py
index a19e36e662d..bb9a64d633f 100644
--- a/cpp/config/IceGridAdmin.py
+++ b/cpp/config/IceGridAdmin.py
@@ -224,20 +224,12 @@ def cleanDbDir(path):
if filename != "CVS" and filename != ".dummy":
fullpath = os.path.join(path, filename);
if os.path.isdir(fullpath):
- cleanDir(fullpath)
- os.rmdir(fullpath)
+ cleanDbDir(fullpath)
+ try:
+ os.rmdir(fullpath)
+ except OSError:
+ # This might fail if the directory is empty (because it itself is
+ # a CVS directory).
+ pass
else:
os.remove(fullpath)
-
-def cleanDir(path):
-
- files = os.listdir(path)
-
- for filename in files:
- fullpath = os.path.join(path, filename);
- if os.path.isdir(fullpath):
- cleanDir(fullpath)
- os.rmdir(fullpath)
- else:
- os.remove(fullpath)
-