summaryrefslogtreecommitdiffstats
path: root/xlators/features/marker/utils/syncdaemon/configinterface.py
diff options
context:
space:
mode:
authorCsaba Henk <csaba@gluster.com>2011-03-10 00:40:05 +0000
committerVijay Bellur <vijay@dev.gluster.com>2011-03-10 07:39:17 -0800
commit50492481a2b1e5a1425598fb44d802ec047f6c2f (patch)
tree1c0ef7ab1a13e31fa707b76ba484f1c0e8471802 /xlators/features/marker/utils/syncdaemon/configinterface.py
parentcbdf22d79ada40e483583a4277aba2faaa769892 (diff)
syncdaemon: add support from dumping urls in canonical and escaped canonical form
Signed-off-by: Kaushik BV <kaushikbv@gluster.com> Signed-off-by: Vijay Bellur <vijay@dev.gluster.com> BUG: 1570 (geosync related changes) URL: http://bugs.gluster.com/cgi-bin/bugzilla3/show_bug.cgi?id=1570
Diffstat (limited to 'xlators/features/marker/utils/syncdaemon/configinterface.py')
-rw-r--r--xlators/features/marker/utils/syncdaemon/configinterface.py11
1 files changed, 4 insertions, 7 deletions
diff --git a/xlators/features/marker/utils/syncdaemon/configinterface.py b/xlators/features/marker/utils/syncdaemon/configinterface.py
index b0aa93f42..cda7da7eb 100644
--- a/xlators/features/marker/utils/syncdaemon/configinterface.py
+++ b/xlators/features/marker/utils/syncdaemon/configinterface.py
@@ -4,11 +4,8 @@ except ImportError:
# py 3
import configparser as ConfigParser
import re
-try:
- # py 3
- from urllib import parse as urllib
-except ImportError:
- import urllib
+
+import syncdutils
SECT_ORD = '__section_order__'
SECT_META = '__meta__'
@@ -33,13 +30,13 @@ class GConffile(object):
st = 'peersrx'
else:
st = 'peers'
- return ' '.join([st] + [urllib.quote_plus(u) for u in peers])
+ return ' '.join([st] + [syncdutils.escape(u) for u in peers])
@staticmethod
def parse_section(section):
sl = section.split()
st = sl.pop(0)
- sl = [urllib.unquote_plus(u) for u in sl]
+ sl = [syncdutils.unescape(u) for u in sl]
if st == 'peersrx':
sl = [re.compile(u) for u in sl]
return sl