Bug 682887 - Python traceback when running rhn_package_manager with -s option
Python traceback when running rhn_package_manager with -s option
Status: CLOSED DUPLICATE of bug 677775
Product: Red Hat Satellite Proxy 5
Classification: Red Hat
Component: Server (Show other bugs)
All Linux
medium Severity medium
: ---
: ---
Assigned To: Miroslav Suchý
Red Hat Satellite QA List
: Patch
Depends On:
Blocks: sat541-triage
  Show dependency treegraph
Reported: 2011-03-07 16:51 EST by Tasos Papaioannou
Modified: 2012-03-08 04:06 EST (History)
2 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Last Closed: 2011-05-05 04:21:09 EDT
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---

Attachments (Terms of Use)

  None (edit)
Description Tasos Papaioannou 2011-03-07 16:51:42 EST
Description of problem:

On a Proxy 5.4 activated on Red Hat Network Hosted, run rhn_package_manager with the -s (sync) option against a custom channel. The following traceback results:

# rhn_package_manager -s -c <channel-label> -vvv
Channels: <channel-label>
Red Hat Network username: <rhn login>
Red Hat Network password: <password>
Connecting to https://xmlrpc.rhn.redhat.com/XP
Traceback (most recent call last):
  File "/usr/bin/rhn_package_manager", line 28, in ?
  File "/usr/share/rhn/PackageManager/rhn_package_manager.py", line 100, in main
  File "/usr/share/rhn/PackageManager/rhn_package_manager.py", line 174, in checkSync
    list = uploadLib.listChannel(self.server, self.username, self.password,
AttributeError: 'module' object has no attribute 'listChannel'

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

How reproducible:


Steps to Reproduce:
1. Activate Proxy 5.4 on RHN Hosted.
2. Attempt to run rhn_package_manager in sync mode (same traceback error results regardless of whether the channel or login credentials are valid:

# rhn_package_manager -c test-channel -s
Red Hat Network username: rhn-login
Red Hat Network password: <password>

3. See above traceback error.
Actual results:

Above traceback error.

Expected results:

No traceback, diff output of channel on RHN with current directory.

Additional info:

Error is due to uploadLib.listChannel not being imported by rhn_package_manager.py. After making the following changes to /usr/share/rhn/PackageManager/rhn_package_manager.py, I was able to run the -s / --sync option successfully.

# diff -pruN rhn_package_manager.py rhn_package_manager_test.py

--- rhn_package_manager.py	2011-01-21 17:41:38.000000000 -0500
+++ rhn_package_manager_test.py	2011-01-21 17:40:20.000000000 -0500
@@ -39,6 +39,7 @@ import shutil
 from types import IntType, StringType
 from operator import truth
 from rhnpush.uploadLib import UploadError
+from rhnpush.uploadLib import listChannel
     from optparse import Option, OptionParser
 except ImportError:
@@ -171,7 +172,8 @@ class UploadClass(uploadLib.UploadClass)
         # List the channel's contents
-        list = uploadLib.listChannel(self.server, self.username, self.password, self.channels)
+        # list = uploadLib.listChannel(self.server, self.username, self.password, self.channels)
+        list = listChannel(self.server, self.username, self.password, self.channels)
         # Convert it to a hash of hashes
         remotePackages = {}

Comment 1 Miroslav Suchý 2011-05-05 04:21:09 EDT

*** This bug has been marked as a duplicate of bug 677775 ***

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