Bug 1001978 - UnboundLocalError("local variable 'msg' referenced before assignment",) from satellite-sync
UnboundLocalError("local variable 'msg' referenced before assignment",) from ...
Status: CLOSED CURRENTRELEASE
Product: Red Hat Satellite 5
Classification: Red Hat
Component: Satellite Synchronization (Show other bugs)
560
Unspecified Unspecified
unspecified Severity unspecified
: ---
: ---
Assigned To: Michael Mráka
Jan Hutař
:
Depends On:
Blocks: sat560-blockers
  Show dependency treegraph
 
Reported: 2013-08-28 04:53 EDT by Jan Hutař
Modified: 2013-10-01 17:52 EDT (History)
1 user (show)

See Also:
Fixed In Version: spacewalk-backend-2.0.3-11
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2013-10-01 17:52:36 EDT
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)

  None (edit)
Description Jan Hutař 2013-08-28 04:53:46 EDT
Description of problem:
I have run following command by mistake and I do consider traceback incorrect result.


Version-Release number of selected component (if applicable):
spacewalk-backend-tools-2.0.3-10.el6sat.noarch


How reproducible:
always


Steps to Reproduce:
1. # satellite-sync --master=<fqdn> -c redhat-linux-i386-6.2 -l


Actual results:
+++ sending log as an email +++
SYNC ERROR: attempting to display as much information as possible:

(Check logs/email for potentially more detail)

UnboundLocalError("local variable 'msg' referenced before assignment",)
local variable 'msg' referenced before assignment


Expected results:
ERROR: The --master option is only valid with the --mount-point option


Additional info:
Traceback is:
Exception reported from <fqdn>
Time: Wed Aug 28 04:36:14 2013
Exception type <type 'exceptions.UnboundLocalError'>

Exception Handler Information
Traceback (most recent call last):
  File "/usr/bin/satellite-sync", line 169, in <module>
    sys.exit(abs(main() or 0))
  File "/usr/bin/satellite-sync", line 138, in main
    return satsync.Runner().main()
  File "/usr/lib/python2.6/site-packages/spacewalk/satellite_tools/satsync.py", line 164, in main
    actionDict, channels = processCommandline()
  File "/usr/lib/python2.6/site-packages/spacewalk/satellite_tools/satsync.py", line 2219, in processCommandline
    log2stderr(-1, msg, cleanYN=1)
UnboundLocalError: local variable 'msg' referenced before assignment

And in the code there is:
# vim /usr/lib/python2.6/site-packages/spacewalk/satellite_tools/satsync.py +2219
        [...]
        if not OPTIONS.mount_point:
            mst = _("ERROR: The --master option is only valid with the --mount-point option")
            log2stderr(-1, msg, cleanYN=1)

(Note that typo: "mst" instead of "msg")


In 5.5.0 (spacewalk-backend-tools-1.7.38-47.el6sat.noarch) there is no option "--master".
Comment 1 Michael Mráka 2013-08-28 08:04:35 EDT
Fixed in spacewalk master as
commit 344387ef652516e49dc3c05a90073563d0ae560d
    1001978 - fixed typo
Comment 2 Michael Mráka 2013-08-28 08:19:28 EDT
Backported to SATELLITE-5.6 as
commit cb494cab132bab614b12ca0a24c3c4481b700d7c
    1001978 - fixed typo
Comment 5 Clifford Perry 2013-10-01 17:52:36 EDT
Satellite 5.6 has been released. This bug was tracked under the release.  

This bug was either VERIFIED or RELEASE_PENDING (re-verified prior shortly
before release). 

Moving to CLOSED CURRENT_RELEASE. 

Text from Upgrade Erratum follows:

Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.

For information on the advisory, and where to find the updated
files, follow the link below.

If the solution does not work for you, open a new bug report.

http://rhn.redhat.com/errata/RHEA-2013-1395.html

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