Bug 500272 - Rawhide: pylint throws an exception when called with the --disable-msg-cat command line option
Summary: Rawhide: pylint throws an exception when called with the --disable-msg-cat co...
Alias: None
Product: Fedora
Classification: Fedora
Component: pylint
Version: 11
Hardware: noarch
OS: Linux
Target Milestone: ---
Assignee: Brian Lane
QA Contact: Fedora Extras Quality Assurance
Depends On:
TreeView+ depends on / blocked
Reported: 2009-05-11 23:25 UTC by Lucas Meneghel Rodrigues
Modified: 2015-10-18 22:42 UTC (History)
3 users (show)

Fixed In Version: 0.20.0-2
Doc Type: Bug Fix
Doc Text:
Clone Of:
Last Closed: 2010-04-06 00:04:37 UTC
Type: ---

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

Description Lucas Meneghel Rodrigues 2009-05-11 23:25:55 UTC
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>
  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
  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 23:28:56 UTC
Created attachment 343516 [details]
Patch that fixes the issue

Comment 2 Bug Zapper 2009-06-09 15:39:03 UTC
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:

Comment 3 Lucas Meneghel Rodrigues 2009-07-22 20:29:52 UTC
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 11:45:16 UTC
Problem still persists on Fedora 12.

Comment 5 Fedora Admin XMLRPC Client 2010-03-24 00:05:56 UTC
This package has changed ownership in the Fedora Package Database.  Reassigning to the new owner of this component.

Comment 6 Brian Lane 2010-04-06 00:04:37 UTC
Submitted this patch upstream since I couldn't find any reference to it in their bug system.


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.