summaryrefslogtreecommitdiffstats
path: root/xlators/features/marker/utils/syncdaemon/gsyncd.py
diff options
context:
space:
mode:
Diffstat (limited to 'xlators/features/marker/utils/syncdaemon/gsyncd.py')
-rw-r--r--xlators/features/marker/utils/syncdaemon/gsyncd.py10
1 files changed, 8 insertions, 2 deletions
diff --git a/xlators/features/marker/utils/syncdaemon/gsyncd.py b/xlators/features/marker/utils/syncdaemon/gsyncd.py
index d02b05d0c31..c414c2a9c1b 100644
--- a/xlators/features/marker/utils/syncdaemon/gsyncd.py
+++ b/xlators/features/marker/utils/syncdaemon/gsyncd.py
@@ -194,14 +194,20 @@ def main_i():
remote = resource.parse_url(args[1])
if not local.can_connect_to(remote):
raise RuntimeError("%s cannot work with %s" % (local.path, remote and remote.path))
- peers = [x.url for x in [local, remote] if x]
+ pa = ([], [])
+ canon = [False, True]
+ for x in (local, remote):
+ if x:
+ for i in range(2):
+ pa[i].append(x.get_url(canonical=canon[i]))
+ peers, canon_peers = pa
gconf.__dict__.update(defaults.__dict__)
if not 'config_file' in rconf:
rconf['config_file'] = os.path.join(os.path.dirname(sys.argv[0]), "conf/gsyncd.conf")
cfg = ConfigParser.RawConfigParser({}, dict)
cfg.read(rconf['config_file'])
- for sect in ('global', 'peers ' + ' '.join(peers)):
+ for sect in ('global', 'peers ' + ' '.join(canon_peers)):
if cfg.has_section(sect):
gconf.__dict__.update(cfg._sections[sect])
gconf.__dict__.update(opts.__dict__)