Bug 476245. Keep better track of our anonymous content. r=smaug, sr=jst
[mozilla-central.git] / config / printconfigsetting.py
blob81f4e39044ec5fb5613fc57dc00829f084b6f959
1 import configobj, sys
3 try:
4 (file, section, key) = sys.argv[1:]
5 except ValueError:
6 print "Usage: printconfigsetting.py <file> <section> <setting>"
7 sys.exit(1)
9 c = configobj.ConfigObj(file)
11 try:
12 s = c[section]
13 except KeyError:
14 print >>sys.stderr, "Section [%s] not found." % section
15 sys.exit(1)
17 try:
18 print s[key]
19 except KeyError:
20 print >>sys.stderr, "Key %s not found." % key
21 sys.exit(1)