17 lines
484 B
Python
17 lines
484 B
Python
import optparse
|
|
import sys
|
|
|
|
import config
|
|
|
|
parser = optparse.OptionParser()
|
|
|
|
parser.add_option("-e", nargs=2, dest="confval", metavar="VALUE")
|
|
|
|
(options, args) = parser.parse_args()
|
|
|
|
if options.confval:
|
|
if not config.Configuration().option_exists(options.confval[0]):
|
|
print "%s: error: %s is not a valid configuration option" % (sys.argv[0], options.confval[0])
|
|
exit(1)
|
|
print "Setting", options.confval[0], "to", options.confval[1]
|
|
config.Configuration().
|