Bug 1141364 - spacewalk-export-channels on RHEL5 fails with SyntaxError
Summary: spacewalk-export-channels on RHEL5 fails with SyntaxError
Keywords:
Status: CLOSED NOTABUG
Alias: None
Product: Red Hat Satellite 5
Classification: Red Hat
Component: Other
Version: 570
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
Assignee: Grant Gainey
QA Contact: Red Hat Satellite QA List
URL:
Whiteboard:
Depends On: 1140593
Blocks: sat570-lowbug
TreeView+ depends on / blocked
 
Reported: 2014-09-12 19:09 UTC by Grant Gainey
Modified: 2014-11-13 14:40 UTC (History)
5 users (show)

Fixed In Version: spacewalk-utils-2.3.2-4-sat
Doc Type: Bug Fix
Doc Text:
Clone Of: 1140593
Environment:
Last Closed: 2014-11-13 14:40:13 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)

Description Grant Gainey 2014-09-12 19:09:48 UTC
+++ This bug was initially created as a clone of Bug #1140593 +++

Description of problem:
spacewalk-export-channels on RHEL5 fails with SyntaxError. 

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


How reproducible:
100%

Steps to Reproduce:
1.# spacewalk-export-channels
  File "/usr/bin/spacewalk-export-channels", line 195
    epoch = pkg['epoch'] if pkg['epoch'] is not None else '0'
                          ^
SyntaxError: invalid syntax


Actual results:
SyntaxError on python2.4

Expected results:
No SyntaxErrors

Additional info:
wrapped by spacewalk-export the error looks this way:

# spacewalk-export
INFO: Processing users...
INFO: Processing system-groups...
INFO: Processing config-files...
INFO: Processing repositories...
INFO: Processing channels...
  File "/usr/bin/spacewalk-export-channels", line 195
    epoch = pkg['epoch'] if pkg['epoch'] is not None else '0'
                          ^
SyntaxError: invalid syntax
INFO: Processing activation-keys...
INFO: Processing kickstart-scripts...
INFO: Processing system-profiles...
INFO: Export-file created at /root/spacewalk-export-dir/spacewalk_export.tar.gz

--- Additional comment from Tomas Lestach on 2014-09-11 06:28:48 EDT ---

spacewalk.git: acd203e067e7a886833be227a2006332a6a36dc0

--- Additional comment from Lukas Pramuk on 2014-09-11 13:39:36 EDT ---

OOPS.

# rpm -q spacewalk-utils
spacewalk-utils-2.0.2-18.el5sat

# spacewalk-export-channels
Export directory has to be specified. Try --help:

usage: spacewalk-export-channels [options]

options:
  -d DIRECTORY, --dir=DIRECTORY
                        Export directory, required
  -e, --exported-only   CSV output will contain only exported packages (by
                        default, CVS output contains all packages, even those
                        available in external repositories and in clone
                        original channels)
  -f FORCE, --force=FORCE
                        Overwrite exported package rpms, even if already
                        present in the dump
  -o ORG_IDS, --org_id=ORG_IDS
                        Export only organization related channels specified by
                        its id
  -q, --quiet           Run quietly
  -s, --skip-repogeneration
                        Repodata generation will be omitted for exported
                        channels
  -S, --no-size         Don't check package size
  -v, --verbose         Increase verbosity
  -h, --help            show this help message and exit
Traceback (most recent call last):
  File "/usr/bin/spacewalk-export-channels", line 293, in ?
    exit(1)
TypeError: 'str' object is not callable

>>> sys.exit

--- Additional comment from Tomas Lestach on 2014-09-12 11:07:53 EDT ---

It looks like Lukas already pushed a fix to ...
spacewalk.git: 4d49d7d2464b8a2194b437c3d163a3147e635c61

Comment 3 Grant Gainey 2014-11-13 14:40:13 UTC
The change was pulled into the 5.7 branch to keep the code in sync between SW, 5.6, and 5.7.  However, since 5.7-installed-on-RHEL5 isn't a supported configuration, this bug can't actually affect 5.7.

Closing as NOTABUG after discussion w/QE


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