Bug 1428831

Summary: spacecmd system_setconfigchannelorder fails with ERROR: 'list' object is not callable
Product: Red Hat Satellite 5 Reporter: Tomáš Kašpárek <tkasparek>
Component: ServerAssignee: Tomáš Kašpárek <tkasparek>
Status: CLOSED CURRENTRELEASE QA Contact: Pavel Studeník <pstudeni>
Severity: medium Docs Contact:
Priority: unspecified    
Version: 580CC: pstudeni, satqe-list, tlestach
Target Milestone: ---   
Target Release: ---   
Hardware: All   
OS: All   
Whiteboard:
Fixed In Version: spacecmd-2.5.0-9-sat Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: 1189291 Environment:
Last Closed: 2017-06-21 12:13:45 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:
Bug Depends On: 1189291    
Bug Blocks: 1358815    

Description Tomáš Kašpárek 2017-03-03 13:02:05 UTC
+++ This bug was initially created as a clone of Bug #1189291 +++

Description of problem:
spacecmd system_setconfigchannelorder <servername>
#(interaction omitted)
a[dd], r[emove], c[lear], d[one]: d
New Configuration Channels
--------------------------
ERROR: 'list' object is not callable


Version-Release number of selected component (if applicable):
Found in production on spacecmd-2.2.11-1.el6.noarch
Verified in nightly (2015-02-04): spacecmd-2.3.14-1.el6.noarch

How reproducible:
ALWAYS


Steps to Reproduce:
1. spacecmd system_setconfigchannelorder <systemname>
2. type "d" <enter> for done
3. See the error :)

Actual results:

a[dd], r[emove], c[lear], d[one]: d

New Configuration Channels
--------------------------
ERROR: 'list' object is not callable

(and the new list is not saved, in the case where you actually change the order)


Expected results:
No error, new channel list saved.


Additional info:
We use this command via a shell script to sort our configuration channels, otherwise I can't comprehend anyone actually interacting with this.


The error appears to be at:
https://git.fedorahosted.org/cgit/spacewalk.git/tree/spacecmd/src/lib/system.py#n1401
(as of today)


    print
    print 'New Configuration Channels'
    print '--------------------------'
    for i, new_channel in new_channels(new_channels, 1):
        print '[%i] %s' % (i, new_channel)

--- Additional comment from Tommy McNeely on 2015-02-04 17:04:44 EST ---

# Workaround:

Comment out the "for" loop (for line and the line below it). It won't print the new channel list, but it was just emitted above before pressing "d" for done, so its not like it really needs to be printed again.

This is at like 1441 for spacecmd-2.2.11-1.el6.noarch

--- Additional comment from Tomáš Kašpárek on 2017-03-03 07:48:38 EST ---

spacewalk.git(master): 11394cc4a8d01aaec725a55c69e8a595400db12c

Comment 3 Pavel Studeník 2017-03-23 12:09:57 UTC
Verified spacecmd-2.5.0-9.el6sat.noarch