do not allow duplicate configure options

This commit is contained in:
Mattias Andrée 2012-08-26 17:34:21 +02:00
parent 76100d0c57
commit 1b8a80a81c

View file

@ -837,8 +837,10 @@ class ArgParser():
(opt, arg, i) = (optqueue[i], argqueue[i], i + 1) (opt, arg, i) = (optqueue[i], argqueue[i], i + 1)
opt = self.optmap[opt][0] opt = self.optmap[opt][0]
if (opt not in self.opts) or (self.opts[opt] is None): if (opt not in self.opts) or (self.opts[opt] is None):
self.opts[opt] = [] self.opts[opt] = [arg]
self.opts[opt].append(arg) else:
sys.stderr.write('%s: fatal: duplicate option %s\n' % (self.__program, arg))
exit(-1)
''' '''
Prints a colourful help message Prints a colourful help message