From 43d95c00ee49cb4852d199f11e2647a5930b07c8 Mon Sep 17 00:00:00 2001 From: Csaba Henk Date: Fri, 15 Apr 2011 09:10:02 +0000 Subject: syncdaemon: when getting a single config option, don't display the option name, just the value This intends to ease scripting (you can just pass on the value to xargs etc.) Signed-off-by: Csaba Henk Signed-off-by: Anand Avati BUG: 1570 (geosync related changes) URL: http://bugs.gluster.com/cgi-bin/bugzilla3/show_bug.cgi?id=1570 --- xlators/features/marker/utils/syncdaemon/configinterface.py | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) (limited to 'xlators/features') diff --git a/xlators/features/marker/utils/syncdaemon/configinterface.py b/xlators/features/marker/utils/syncdaemon/configinterface.py index 8bcfbcb39..fce45a2bb 100644 --- a/xlators/features/marker/utils/syncdaemon/configinterface.py +++ b/xlators/features/marker/utils/syncdaemon/configinterface.py @@ -112,11 +112,14 @@ class GConffile(object): self.update_to(d) if opt: opt = norm(opt) - d = {opt: d.get(opt, "")} - for k, v in d.iteritems(): - if k == '__name__': - continue - print("%s: %s" % (k, v)) + v = d.get(opt) + if v: + print v + else: + for k, v in d.iteritems(): + if k == '__name__': + continue + print("%s: %s" % (k, v)) def write(self, trfn, opt, *a, **kw): def mergeconf(f): -- cgit