Revision 2bc2a341987df5ca2df5b2340ce8112e9c1b4aaa authored by B2G Bumper Bot on 09 May 2014, 13:16:00 UTC, committed by B2G Bumper Bot on 09 May 2014, 13:16:00 UTC
========

https://hg.mozilla.org/integration/gaia-1_3/rev/419fb6e35617
Author: Michael Henretty <michael.henretty@gmail.com>
Desc: Bug 1001049 - use specific version of marionette apps r=gaye a=tests
1 parent d8410b0
Raw File
printconfigsetting.py
# This Source Code Form is subject to the terms of the Mozilla Public
# License, v. 2.0. If a copy of the MPL was not distributed with this
# file, You can obtain one at http://mozilla.org/MPL/2.0/.

import configobj, sys

try:
    (file, section, key) = sys.argv[1:]
except ValueError:
    print "Usage: printconfigsetting.py <file> <section> <setting>"
    sys.exit(1)

c = configobj.ConfigObj(file)

try:
    s = c[section]
except KeyError:
    print >>sys.stderr, "Section [%s] not found." % section
    sys.exit(1)

try:
    print s[key]
except KeyError:
    print >>sys.stderr, "Key %s not found." % key
    sys.exit(1)
back to top