Bug 997575 - [pylint] E:685,56:_convert_to_outputformat: Undefined variable 'opt'
[pylint] E:685,56:_convert_to_outputformat: Undefined variable 'opt'
Product: Fedora
Classification: Fedora
Component: python-bugzilla (Show other bugs)
Unspecified Unspecified
unspecified Severity unspecified
: ---
: ---
Assigned To: Will Woods
Fedora Extras Quality Assurance
Depends On:
  Show dependency treegraph
Reported: 2013-08-15 12:13 EDT by Steve Tyler
Modified: 2013-08-15 13:32 EDT (History)
6 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Last Closed: 2013-08-15 13:17:45 EDT
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---

Attachments (Terms of Use)

  None (edit)
Description Steve Tyler 2013-08-15 12:13:31 EDT
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):

How reproducible:

Steps to Reproduce:

Actual results:

Expected results:

Additional info:
Comment 1 Steve Tyler 2013-08-15 12:17:11 EDT
In line 685, "opt.output" should be "output":

$ less -N /usr/bin/bugzilla 
    657 def _convert_to_outputformat(output):
    658     fmt = ""
    660     if output == "normal":
    684     else:
    685         raise RuntimeError("Unknown output type '%s'" % opt.output)
    687     return fmt
Comment 2 Cole Robinson 2013-08-15 12:26:10 EDT
Huh, I wonder why our upstream pylint infrastructure didn't catch this? Thanks for noticing
Comment 3 Cole Robinson 2013-08-15 13:17:45 EDT
Fixed upstream now:


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.
Comment 4 Steve Tyler 2013-08-15 13:32:06 EDT
Thanks. That's way more than I would have known to do ... :-)

Note You need to log in before you can comment on or make changes to this bug.