summaryrefslogtreecommitdiffstats
path: root/tools
diff options
context:
space:
mode:
Diffstat (limited to 'tools')
-rwxr-xr-xtools/glusterfind/S57glusterfind-delete-post.py7
1 files changed, 6 insertions, 1 deletions
diff --git a/tools/glusterfind/S57glusterfind-delete-post.py b/tools/glusterfind/S57glusterfind-delete-post.py
index 70edb563320..9e7774a9828 100755
--- a/tools/glusterfind/S57glusterfind-delete-post.py
+++ b/tools/glusterfind/S57glusterfind-delete-post.py
@@ -40,7 +40,12 @@ def main():
# Check all session directories, if any directory found for
# the deleted volume, cleanup all the session directories
- for session in os.listdir(glusterfind_dir):
+ try:
+ ls_glusterfind_dir = os.listdir(glusterfind_dir)
+ except OSError:
+ ls_glusterfind_dir = []
+
+ for session in ls_glusterfind_dir:
# Possible session directory
volume_session_path = os.path.join(glusterfind_dir,
session,