[New-bugs-announce] [issue13399] Don't print traceback for recognized options in packaging

Arfrever Frehtes Taifersar Arahesis report at bugs.python.org
Mon Nov 14 15:34:28 CET 2011

New submission from Arfrever Frehtes Taifersar Arahesis <Arfrever.FTA at GMail.Com>:

$ python3.3 setup.py build --some-option
usage: setup.py [global_opts] cmd1 [cmd1_opts] [cmd2 [cmd2_opts] ...]
   or: setup.py --help [cmd1 cmd2 ...]
   or: setup.py --help-commands
   or: setup.py cmd --help

error: option --some-option not recognized
$ pysetup3.3 run build --some-option
option --some-option not recognized
Traceback (most recent call last):
  File "/usr/lib64/python3.3/packaging/fancy_getopt.py", line 239, in getopt
    opts, args = getopt.getopt(args, short_opts, self.long_opts)
  File "/usr/lib64/python3.3/getopt.py", line 93, in getopt
    opts, args = do_longs(opts, args[0][2:], longopts, args[1:])
  File "/usr/lib64/python3.3/getopt.py", line 157, in do_longs
    has_arg, opt = long_has_args(opt, longopts)
  File "/usr/lib64/python3.3/getopt.py", line 174, in long_has_args
    raise GetoptError(_('option --%s not recognized') % opt, opt)
getopt.GetoptError: option --some-option not recognized

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/usr/lib64/python3.3/packaging/run.py", line 653, in main
    return dispatcher()
  File "/usr/lib64/python3.3/packaging/run.py", line 642, in __call__
    return func(self, self.args)
  File "/usr/lib64/python3.3/packaging/run.py", line 91, in wrapper
    return f(*args, **kwargs)
  File "/usr/lib64/python3.3/packaging/run.py", line 271, in _run
    args = dispatcher._parse_command_opts(parser, args)
  File "/usr/lib64/python3.3/packaging/run.py", line 491, in _parse_command_opts
    args, opts = parser.getopt(args[1:])
  File "/usr/lib64/python3.3/packaging/fancy_getopt.py", line 241, in getopt
    raise PackagingArgError(msg)
packaging.errors.PackagingArgError: option --some-option not recognized

assignee: tarek
components: Distutils2
keywords: easy
messages: 147599
nosy: Arfrever, alexis, eric.araujo, tarek
priority: normal
severity: normal
status: open
title: Don't print traceback for recognized options in packaging
versions: Python 3.3

Python tracker <report at bugs.python.org>

More information about the New-bugs-announce mailing list