diff options
author | Matthew Newhook <matthew@zeroc.com> | 2006-06-14 17:45:39 +0000 |
---|---|---|
committer | Matthew Newhook <matthew@zeroc.com> | 2006-06-14 17:45:39 +0000 |
commit | e15a4b7862cd7ecd1c14fb78155256d0856f4ba7 (patch) | |
tree | c87937ee2f0761c9037b5234248c6423d24a5234 /java/config/IceGridAdmin.py | |
parent | implemented VerifyDepthMax in Java, C# (diff) | |
download | ice-e15a4b7862cd7ecd1c14fb78155256d0856f4ba7.tar.bz2 ice-e15a4b7862cd7ecd1c14fb78155256d0856f4ba7.tar.xz ice-e15a4b7862cd7ecd1c14fb78155256d0856f4ba7.zip |
updates to the test harness. Fixed a bug with cleanDb in IceGridAdmin.py.
Diffstat (limited to 'java/config/IceGridAdmin.py')
-rw-r--r-- | java/config/IceGridAdmin.py | 22 |
1 files changed, 7 insertions, 15 deletions
diff --git a/java/config/IceGridAdmin.py b/java/config/IceGridAdmin.py index 72bb05d36d1..11e463a5e8c 100644 --- a/java/config/IceGridAdmin.py +++ b/java/config/IceGridAdmin.py @@ -232,20 +232,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) - |