Bug 500272 - Rawhide: pylint throws an exception when called with the --disable-msg-cat command line option
Rawhide: pylint throws an exception when called with the --disable-msg-cat co...
Status: CLOSED RAWHIDE
Product: Fedora
Classification: Fedora
Component: pylint (Show other bugs)
11
noarch Linux
low Severity medium
: ---
: ---
Assigned To: Brian Lane
Fedora Extras Quality Assurance
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2009-05-11 19:25 EDT by Lucas Meneghel Rodrigues
Modified: 2015-10-18 18:42 EDT (History)
3 users (show)

See Also:
Fixed In Version: 0.20.0-2
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2010-04-05 20:04:37 EDT
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)
Patch that fixes the issue (755 bytes, patch)
2009-05-11 19:28 EDT, Lucas Meneghel Rodrigues
no flags Details | Diff

  None (edit)
Description Lucas Meneghel Rodrigues 2009-05-11 19:25:55 EDT
Description of problem: Executing pylint with the --disable-msg-cat command line option throws an exception as follows:

[shell]$ pylint --disable-msg-cat=warning,refactor,convention
Traceback (most recent call last):
  File "/usr/bin/pylint", line 4, in <module>
    lint.Run(sys.argv[1:])
  File "/usr/lib/python2.6/site-packages/pylint/lint.py", line 850, in __init__
    args = linter.load_command_line_configuration(args)
  File "/usr/lib/python2.6/site-packages/logilab/common/configuration.py", line 577, in load_command_line_configuration
    (options, args) = self._optik_parser.parse_args(args=args)
  File "/usr/lib/python2.6/optparse.py", line 1378, in parse_args
    stop = self._process_args(largs, rargs, values)
  File "/usr/lib/python2.6/optparse.py", line 1418, in _process_args
    self._process_long_opt(rargs, values)
  File "/usr/lib/python2.6/optparse.py", line 1493, in _process_long_opt
    option.process(opt, value, values, self)
  File "/usr/lib/python2.6/site-packages/logilab/common/optik_ext.py", line 239, in process
    self.action, self.dest, opt, value, values, parser)
  File "/usr/lib/python2.6/optparse.py", line 802, in take_action
    self.callback(self, opt, value, parser, *args, **kwargs)
  File "/usr/lib/python2.6/site-packages/logilab/common/configuration.py", line 454, in cb_set_provider_option
    self.global_set_option(opt_name, value)
  File "/usr/lib/python2.6/site-packages/logilab/common/configuration.py", line 458, in global_set_option
    self._all_options[opt_name].set_option(opt_name, value)
  File "/usr/lib/python2.6/site-packages/pylint/lint.py", line 318, in set_option
    meth(_id)
  File "/usr/lib/python2.6/site-packages/pylint/utils.py", line 193, in disable_message_category
    for catid in self._cat_ids(categories):
  File "/usr/lib/python2.6/site-packages/pylint/utils.py", line 187, in _cat_ids
    raise Exception('Unknown category identifier %s' % catid)
Exception: Unknown category identifier A

Version-Release number of selected component (if applicable): pylint-0.16.0-2.fc11.noarch


How reproducible: Allways


Steps to Reproduce:
1. Have pylint installed (yum install pylint) on latest rawhide
2. Execute it with the command line option --disable-msg-cat

pylint --disable-msg-cat=warning,refactor,convention

As an example

3. Watch it throw the exception
  
Actual results: Exception thrown

Expected results: Help message for pylint

Additional info: After debugging the problem, I realized that in the function _cat_ids, on utils.py, when the argument categories is a string instead of a list, the loop 

for catid in categories:

Will consider the string an array of characters. I made a patch that fixes the problem against the rawhide version of the package.
Comment 1 Lucas Meneghel Rodrigues 2009-05-11 19:28:56 EDT
Created attachment 343516 [details]
Patch that fixes the issue
Comment 2 Bug Zapper 2009-06-09 11:39:03 EDT
This bug appears to have been reported against 'rawhide' during the Fedora 11 development cycle.
Changing version to '11'.

More information and reason for this action is here:
http://fedoraproject.org/wiki/BugZappers/HouseKeeping
Comment 3 Lucas Meneghel Rodrigues 2009-07-22 16:29:52 EDT
Hello folks, the patch has been working fine for me, but it'd be nice to get a bugfix applied to the pylint module.

I would like to apply for maintenance of the pylint module on Fedora. Just need to figure out how to do it...
Comment 4 Lucas Meneghel Rodrigues 2009-11-30 06:45:16 EST
Problem still persists on Fedora 12.
Comment 5 Fedora Admin XMLRPC Client 2010-03-23 20:05:56 EDT
This package has changed ownership in the Fedora Package Database.  Reassigning to the new owner of this component.
Comment 6 Brian Lane 2010-04-05 20:04:37 EDT
Submitted this patch upstream since I couldn't find any reference to it in their bug system.

http://lists.logilab.org/pipermail/python-projects/2010-April/002397.html

I also added the patch to the f14 build.

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