Description of problem: pylint reports several errors. This one is a definite positive: E:685,56:_convert_to_outputformat: Undefined variable 'opt' $ pylint -E /usr/bin/bugzilla No config file found, using default configuration ************* Module bugzilla E: 83,47:setup_parser: Module 'bugzilla' has no '__version__' member E: 92,50:setup_parser: Module 'bugzilla' has no 'classlist' member E:435,16:generate_man_page: Module 'bugzilla' has no '__version__' member E:685,56:_convert_to_outputformat: Undefined variable 'opt' E:1019,18:main: Module 'bugzilla' has no 'Bugzilla' member E:1020,30:main: Module 'bugzilla' has no 'classlist' member E:1024,55:main: Module 'bugzilla' has no 'classlist' member Version-Release number of selected component (if applicable): python-bugzilla-0.9.0-1.fc19.noarch How reproducible: Steps to Reproduce: 1. 2. 3. Actual results: Expected results: Additional info:
In line 685, "opt.output" should be "output": $ less -N /usr/bin/bugzilla ... 657 def _convert_to_outputformat(output): 658 fmt = "" 659 660 if output == "normal": ... 684 else: 685 raise RuntimeError("Unknown output type '%s'" % opt.output) 686 687 return fmt ...
Huh, I wonder why our upstream pylint infrastructure didn't catch this? Thanks for noticing
Fixed upstream now: https://git.fedorahosted.org/cgit/python-bugzilla.git/commit/?id=c9b2b06ec0bce9a41109193fa3b50a3130910434 Given that the code path can't be hit in practice (it's to prevent against future coding errors), just closing as UPSTREAM since it isn't worth a backport.
Thanks. That's way more than I would have known to do ... :-)