summaryrefslogtreecommitdiffstats
path: root/xlators/features/marker/utils/syncdaemon/syncdutils.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/syncdutils.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/syncdutils.py')
-rw-r--r--xlators/features/marker/utils/syncdaemon/syncdutils.py11
1 files changed, 11 insertions, 0 deletions
diff --git a/xlators/features/marker/utils/syncdaemon/syncdutils.py b/xlators/features/marker/utils/syncdaemon/syncdutils.py
new file mode 100644
index 000000000..52dad8c5f
--- /dev/null
+++ b/xlators/features/marker/utils/syncdaemon/syncdutils.py
@@ -0,0 +1,11 @@
+try:
+ # py 3
+ from urllib import parse as urllib
+except ImportError:
+ import urllib
+
+def escape(s):
+ return urllib.quote_plus(s)
+
+def unescape(s):
+ return urllib.unquote_plus(s)