summaryrefslogtreecommitdiffstats
path: root/tools/glusterfind/src/brickfind.py
diff options
context:
space:
mode:
Diffstat (limited to 'tools/glusterfind/src/brickfind.py')
-rw-r--r--tools/glusterfind/src/brickfind.py7
1 files changed, 6 insertions, 1 deletions
diff --git a/tools/glusterfind/src/brickfind.py b/tools/glusterfind/src/brickfind.py
index f300638d602..57e4c71e750 100644
--- a/tools/glusterfind/src/brickfind.py
+++ b/tools/glusterfind/src/brickfind.py
@@ -1,4 +1,5 @@
#!/usr/bin/env python
+# -*- coding: utf-8 -*-
# Copyright (c) 2015 Red Hat, Inc. <http://www.redhat.com/>
# This file is part of GlusterFS.
@@ -40,7 +41,8 @@ def brickfind_crawl(brick, args):
def output_callback(path, filter_result):
path = path.strip()
path = path[brick_path_len+1:]
- output_write(fout, path, args.output_prefix, encode=True)
+ output_write(fout, path, args.output_prefix,
+ encode=(not args.no_encode))
ignore_dirs = [os.path.join(brick, dirname)
for dirname in
@@ -63,6 +65,9 @@ def _get_args():
parser.add_argument("outfile", help="Output File")
parser.add_argument("start", help="Start Time", type=float)
parser.add_argument("--debug", help="Debug", action="store_true")
+ parser.add_argument("--no-encode",
+ help="Do not encode path in outfile",
+ action="store_true")
parser.add_argument("--output-prefix", help="File prefix in output",
default=".")