% rpm -q koji koji-1.7.0-2.fc17.noarch % koji --help-commands Available commands: Traceback (most recent call last): File "/usr/bin/koji", line 5793, in <module> options, command, args = get_options() File "/usr/bin/koji", line 149, in get_options list_commands() File "/usr/bin/koji", line 5732, in list_commands if desc.startswith('[admin] '): AttributeError: 'NoneType' object has no attribute 'startswith'
I cannot replicate this. Can you verify your installation? (rpm -V koji)
And if that verifies fine, also run "rpm -V python-libs", because of desc = handler.__doc__ if desc.startswith('[admin] '): and __doc__ may be none if there's a problem with the handler object (logging.StreamHandler).
Oops, sorry, ignore previous comment. I've grepped it incorrectly. handler is within koji: |def list_commands(show_admin=False): | handlers = [] | for name,value in globals().items(): | if name.startswith('handle_'): | alias = name.replace('handle_','') | alias = alias.replace('_','-') | handlers.append((alias,value)) | elif name.startswith('anon_handle_'): | alias = name.replace('anon_handle_','') | alias = alias.replace('_','-') | handlers.append((alias,value)) | handlers.sort() | print _("Available commands:") | for alias,handler in handlers: | desc = handler.__doc__ | if desc.startswith('[admin] '): | ...
Created attachment 659106 [details] add some debug statements to koji All the handlers in koji have docstrings. I'm lost as to how this can fail on your system but not in my f17 test env. Can you do the following? # cp /usr/bin/koji /tmp # patch /tmp/koji <koji-debug.patch #attached # /tmp/koji list-commands Also, what version of python are you running?
Oh, it's because the OLPC folks set $PYTHONOPTIMIZE=2 by default, which strips out docstrings. This is probably WONTFIX, then. Sorry for the noise.
Ah, ok then.