summaryrefslogtreecommitdiffstats
path: root/tools/glusterfind/src/main.py
diff options
context:
space:
mode:
authorAravinda VK <avishwan@redhat.com>2017-07-03 14:51:21 +0530
committerAravinda VK <avishwan@redhat.com>2017-07-21 08:41:13 +0000
commitdf85ed48e5e94449cdcc77de3b86e10ccea49f1e (patch)
treee657add312f453e35ad60268ba768caaff6dd8a6 /tools/glusterfind/src/main.py
parent08ee8541cfc9096a7f1cb40db7d7df763256d535 (diff)
tools/glusterfind: Fix encoding to encode only space,newline and percent chars
libgfchangelog was encoding path using spec rfc3986, but encoding only required for SPACE, NEWLINE and PERCENT chars since the NEWLINE char is used as record separator and SPACE as field separator in the parsed changelogs output. Changed the encoding function to encode only SPACE, NEWLINE and PERCENT chars BUG: 1451724 Change-Id: Ic1dea824d23493dedcf3db45f353f90572f4e046 Signed-off-by: Aravinda VK <avishwan@redhat.com> Reviewed-on: https://review.gluster.org/17788 CentOS-regression: Gluster Build System <jenkins@build.gluster.org> Smoke: Gluster Build System <jenkins@build.gluster.org> Reviewed-by: Milind Changire <mchangir@redhat.com>
Diffstat (limited to 'tools/glusterfind/src/main.py')
-rw-r--r--tools/glusterfind/src/main.py7
1 files changed, 3 insertions, 4 deletions
diff --git a/tools/glusterfind/src/main.py b/tools/glusterfind/src/main.py
index 3d0f02a65d4..e7e9889569c 100644
--- a/tools/glusterfind/src/main.py
+++ b/tools/glusterfind/src/main.py
@@ -21,13 +21,13 @@ import shutil
import tempfile
import signal
from datetime import datetime
+import codecs
from utils import execute, is_host_local, mkdirp, fail
from utils import setup_logger, human_time, handle_rm_error
from utils import get_changelog_rollover_time, cache_output, create_file
import conf
from changelogdata import OutputMerger
-import codecs
PROG_DESCRIPTION = """
GlusterFS Incremental API
@@ -481,10 +481,9 @@ def write_output(outfile, outfilemerger, field_separator):
for p in paths:
if p == "":
continue
- p_rep = p.replace("%2F%2F", "%2F").replace("//", "/")
+ p_rep = p.replace("//", "/")
if not row_2_rep:
- row_2_rep = row[2].replace("%2F%2F", "%2F").replace("//",
- "/")
+ row_2_rep = row[2].replace("//", "/")
if p_rep == row_2_rep:
continue