diff options
author | Florent Xicluna <florent.xicluna@gmail.com> | 2014-05-05 20:09:19 +0200 |
---|---|---|
committer | Florent Xicluna <florent.xicluna@gmail.com> | 2014-05-05 20:09:19 +0200 |
commit | 3beebfb0be9df325629ed249bd5a9576ffe79b2e (patch) | |
tree | 0e443e1f9f0844aee9dcbc5acde43996a8819029 /pep8.py | |
parent | 047b7fdb07ebde0a54661bf5d2aa9a9831c83d6f (diff) | |
download | pep8-3beebfb0be9df325629ed249bd5a9576ffe79b2e.tar.gz |
Do not exit when an option in setup.cfg / tox.ini is not recognized
Diffstat (limited to 'pep8.py')
-rwxr-xr-x | pep8.py | 7 |
1 files changed, 3 insertions, 4 deletions
@@ -1837,12 +1837,11 @@ def read_config(options, args, arglist, parser): # Second, parse the configuration for opt in config.options(pep8_section): + if opt.replace('_', '-') not in parser.config_options: + print(" unknown option '%s' ignored" % opt) + continue if options.verbose > 1: print(" %s = %s" % (opt, config.get(pep8_section, opt))) - if opt.replace('_', '-') not in parser.config_options: - print("Unknown option: '%s'\n not in [%s]" % - (opt, ' '.join(parser.config_options))) - sys.exit(1) normalized_opt = opt.replace('-', '_') opt_type = option_list[normalized_opt] if opt_type in ('int', 'count'): |