Bug 1112956 - spacecmd run into an SpacewalkShell instance has no attribute issue
Summary: spacecmd run into an SpacewalkShell instance has no attribute issue
Keywords:
Status: CLOSED UPSTREAM
Alias: None
Product: Spacewalk
Classification: Community
Component: API
Version: 2.2
Hardware: x86_64
OS: Linux
medium
medium
Target Milestone: ---
Assignee: Tomáš Kašpárek
QA Contact: Red Hat Satellite QA List
URL:
Whiteboard:
Depends On:
Blocks: space27
TreeView+ depends on / blocked
 
Reported: 2014-06-25 06:17 UTC by Gregor Gruener
Modified: 2017-09-28 18:08 UTC (History)
1 user (show)

Fixed In Version: spacecmd-2.2.10-1
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2014-06-25 13:10:32 UTC
Embargoed:


Attachments (Terms of Use)

Description Gregor Gruener 2014-06-25 06:17:52 UTC
Description of problem:
With the latest version of spacecmd, if I run a command from bash, I run into the following issue:

# spacecmd -d -- user_list
DEBUG: : False
DEBUG: Read configuration from /root/.spacecmd/config
DEBUG: Loading configuration section [spacecmd]
DEBUG: Current Configuration: {'username': 'admin', 'nossl': False, 'server': 'localhost'}
DEBUG: Configuration section [localhost] does not exist
DEBUG: Connecting to https://localhost/rpc/api
DEBUG: Server API Version = 13.0
DEBUG: Using cached credentials from /root/.spacecmd/localhost/session
DEBUG: Loading cache from /root/.spacecmd/localhost/ssm
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 admin
ERROR: SpacewalkShell instance has no attribute 'print_result'
Traceback (most recent call last):
  File "/usr/bin/spacecmd", line 139, in <module>
    shell.print_result(shell.onecmd( precmd ), precmd)
AttributeError: SpacewalkShell instance has no attribute 'print_result'

With an older Version of spacecmd(2.2.5-1.el6.noarch), it is running without any problem.

Version-Release number of selected component (if applicable):
spacecmd-2.2.9-1.el6.noarch

How reproducible:
Install spacecmd in the above version on a satellite5.6 server. I know it is just supported in spacewalk and I will also be able to test it on a spacewalk server in the next days. 

Steps to Reproduce:
1. run satellite5.6
2. run spacecmd in the above version
3. from the bash command line exec any command

Actual results:
ERROR: SpacewalkShell instance has no attribute 'print_result'

Expected results:
I will get an result output of the query

Additional info:

Comment 1 Gregor Gruener 2014-06-25 13:10:32 UTC
Allright, I see today was the 2.2.10-1 Version released and the problem is fixed.

Comment 2 Eric Herget 2017-09-28 18:08:26 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.