summaryrefslogtreecommitdiffstats
path: root/xlators/features/marker/utils
diff options
context:
space:
mode:
authorCsaba Henk <csaba@gluster.com>2011-04-15 09:10:02 +0000
committerAnand Avati <avati@gluster.com>2011-04-16 04:10:28 -0700
commit43d95c00ee49cb4852d199f11e2647a5930b07c8 (patch)
treedd8c98f84f8b583cea146298081aea23ca57cacf /xlators/features/marker/utils
parent5c9c2555911d8d7131e3c0d918f6ee9c0b3b612f (diff)
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 <csaba@gluster.com> Signed-off-by: Anand Avati <avati@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')
-rw-r--r--xlators/features/marker/utils/syncdaemon/configinterface.py13
1 files changed, 8 insertions, 5 deletions
diff --git a/xlators/features/marker/utils/syncdaemon/configinterface.py b/xlators/features/marker/utils/syncdaemon/configinterface.py
index 8bcfbcb39b6..fce45a2bb07 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):