diff options
author | Mattias Andrée <maandree@operamail.com> | 2012-08-26 17:34:21 +0200 |
---|---|---|
committer | Mattias Andrée <maandree@operamail.com> | 2012-08-26 17:34:21 +0200 |
commit | 1b8a80a81c4a91745a350b3621be108d93dddb20 (patch) | |
tree | 9a0f5dfe2a50df34997d16d55bd3900629b38dca | |
parent | 76100d0c57e8e503fcf15a46345ee91c311af364 (diff) | |
download | ponysay-1b8a80a81c4a91745a350b3621be108d93dddb20.tar.gz ponysay-1b8a80a81c4a91745a350b3621be108d93dddb20.tar.bz2 ponysay-1b8a80a81c4a91745a350b3621be108d93dddb20.zip |
do not allow duplicate configure options
-rwxr-xr-x | setup.py | 6 |
1 files changed, 4 insertions, 2 deletions
@@ -837,8 +837,10 @@ class ArgParser(): (opt, arg, i) = (optqueue[i], argqueue[i], i + 1) opt = self.optmap[opt][0] if (opt not in self.opts) or (self.opts[opt] is None): - self.opts[opt] = [] - self.opts[opt].append(arg) + self.opts[opt] = [arg] + else: + sys.stderr.write('%s: fatal: duplicate option %s\n' % (self.__program, arg)) + exit(-1) ''' Prints a colourful help message |