summaryrefslogtreecommitdiffstats
path: root/tools/glusterfind/S57glusterfind-delete-post.py
diff options
context:
space:
mode:
Diffstat (limited to 'tools/glusterfind/S57glusterfind-delete-post.py')
-rwxr-xr-xtools/glusterfind/S57glusterfind-delete-post.py8
1 files changed, 6 insertions, 2 deletions
diff --git a/tools/glusterfind/S57glusterfind-delete-post.py b/tools/glusterfind/S57glusterfind-delete-post.py
index 9e7774a9828..5beece220f0 100755
--- a/tools/glusterfind/S57glusterfind-delete-post.py
+++ b/tools/glusterfind/S57glusterfind-delete-post.py
@@ -1,4 +1,4 @@
-#!/usr/bin/python
+#!/usr/bin/python3
import os
import shutil
from errno import ENOENT
@@ -18,7 +18,7 @@ def handle_rm_error(func, path, exc_info):
def get_glusterd_workdir():
p = Popen(["gluster", "system::", "getwd"],
- stdout=PIPE, stderr=PIPE)
+ stdout=PIPE, stderr=PIPE, universal_newlines=True)
out, _ = p.communicate()
@@ -46,6 +46,10 @@ def main():
ls_glusterfind_dir = []
for session in ls_glusterfind_dir:
+ # don't blow away the keys directory
+ if session == ".keys":
+ continue
+
# Possible session directory
volume_session_path = os.path.join(glusterfind_dir,
session,