Bug 884343
| Summary: | --help-commands broken in koji client | ||||||
|---|---|---|---|---|---|---|---|
| Product: | [Fedora] Fedora | Reporter: | T.C. Hollingsworth <tchollingsworth> | ||||
| Component: | koji | Assignee: | Dennis Gilmore <dennis> | ||||
| Status: | CLOSED WONTFIX | QA Contact: | Fedora Extras Quality Assurance <extras-qa> | ||||
| Severity: | unspecified | Docs Contact: | |||||
| Priority: | unspecified | ||||||
| Version: | 17 | CC: | dennis, mikem | ||||
| Target Milestone: | --- | ||||||
| Target Release: | --- | ||||||
| Hardware: | Unspecified | ||||||
| OS: | Unspecified | ||||||
| Whiteboard: | |||||||
| Fixed In Version: | Doc Type: | Bug Fix | |||||
| Doc Text: | Story Points: | --- | |||||
| Clone Of: | Environment: | ||||||
| Last Closed: | 2012-12-10 17:05:43 UTC | Type: | Bug | ||||
| Regression: | --- | Mount Type: | --- | ||||
| Documentation: | --- | CRM: | |||||
| Verified Versions: | Category: | --- | |||||
| oVirt Team: | --- | RHEL 7.3 requirements from Atomic Host: | |||||
| Cloudforms Team: | --- | Target Upstream Version: | |||||
| Embargoed: | |||||||
| Attachments: |
|
||||||
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. |
% 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'