Bug 1125121 - spacecmd package_details fails
Summary: spacecmd package_details fails
Alias: None
Product: Spacewalk
Classification: Community
Component: Server
Version: 2.2
Hardware: x86_64
OS: Linux
Target Milestone: ---
Assignee: Tomas Lestach
QA Contact: Red Hat Satellite QA List
Depends On:
Blocks: space27
TreeView+ depends on / blocked
Reported: 2014-07-31 05:42 UTC by Andre Speelmans
Modified: 2017-09-28 18:11 UTC (History)
2 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Last Closed: 2014-11-11 08:14:46 UTC

Attachments (Terms of Use)

Description Andre Speelmans 2014-07-31 05:42:20 UTC
Description of problem:
When using spacecmd and trying to get specifics from a package, it fails on every package.

Version-Release number of selected component (if applicable):

How reproducible:
Run spacecmd to retrieve package details

Steps to Reproduce:
1. spacecmd package_details 389-ds-base-

Actual results (when used with -d option):
DEBUG: : False
DEBUG: Read configuration from /root/.spacecmd/config
DEBUG: Loading configuration section [spacecmd]
DEBUG: Current Configuration: {'server': 'localhost'}
DEBUG: Configuration section [localhost] does not exist
DEBUG: Connecting to https://localhost/rpc/api
DEBUG: Server API Version = 15
DEBUG: Using cached credentials from /root/.spacecmd/localhost/session
DEBUG: Loading cache from /root/.spacecmd/localhost/ssm
DEBUG: /root/.spacecmd/localhost/ssm does not exist
DEBUG: : False
DEBUG: Loading cache from /root/.spacecmd/localhost/systems
DEBUG: Loading cache from /root/.spacecmd/localhost/errata
DEBUG: Loading cache from /root/.spacecmd/localhost/packages_short
DEBUG: Loading cache from /root/.spacecmd/localhost/packages_long
DEBUG: Loading cache from /root/.spacecmd/localhost/packages_by_id
INFO: Connected to https://localhost/rpc/api as system
** Generating package cache **ERROR: 'int' object has no attribute 'append'
Traceback (most recent call last):
  File "/usr/bin/spacecmd", line 139, in <module>
    shell.print_result(shell.onecmd( precmd ), precmd)
  File "/usr/lib64/python2.6/cmd.py", line 219, in onecmd
    return func(arg)
  File "/usr/lib/python2.6/site-packages/spacecmd/package.py", line 51, in do_package_details
    packages.extend(self.do_package_search(' '.join(args), True))
  File "/usr/lib/python2.6/site-packages/spacecmd/package.py", line 138, in do_package_search
    packages = filter_results(self.get_package_names(True),
  File "/usr/lib/python2.6/site-packages/spacecmd/misc.py", line 598, in get_package_names
  File "/usr/lib/python2.6/site-packages/spacecmd/misc.py", line 563, in generate_package_cache
AttributeError: 'int' object has no attribute 'append'

Expected results:
Information about the package

Additional info:
The system spacewalk is running on has recently been updated from 1.7 to 2.2.

Comment 1 Tomas Lestach 2014-11-07 16:57:28 UTC
$ spacecmd package_details 389-ds-base-
runs just fine on my Spacewalk nightly machine. The code also looks ok.

If your Spacewalk was updated from an older version, I'd recommend to delete spacecmd cache (as spacecmd-2.2.10 and newer does not work with cache stored by an older spacecmd):
# mv .spacecmd/localhost/ /tmp
and try again.

Does it help?

Comment 2 Andre Speelmans 2014-11-11 07:43:20 UTC
This indeed solved the issue. Thanks for the assistance.

Comment 3 Tomas Lestach 2014-11-11 08:14:46 UTC
(In reply to Andre Speelmans from comment #2)
> This indeed solved the issue. Thanks for the assistance.

Great! Thank you for the information.

Closing the bug.

Comment 4 Eric Herget 2017-09-28 18:11:12 UTC
This BZ closed some time during 2.5, 2.6 or 2.7.  Adding to 2.7 tracking bug.

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