rhnreg_ks fails with exceptions.UnboundLocalError

Solution Verified - Updated -

Issue

  • up2date --register does nothing.
  • rhnreg_ks throws errors.

# rhnreg_ks --username your_username --password your_password
An error has occurred:
exceptions.UnboundLocalError

  • /var/log/up2date shows below error.

up2date   File "/usr/sbin/rhnreg_ks", line 404, in ?
    main()
   File "/usr/sbin/rhnreg_ks", line 266, in main
    sourcesFile.writeUp2date()
   File "/usr/share/rhn/up2date_client/sourcesConfig.py", line 115, in writeUp2date
    lines.insert(firstUsedLine-1, "up2date default\n")

Environment

  • Red Hat Enterprise Linux (RHEL) 4.x

Subscriber exclusive content

A Red Hat subscription provides unlimited access to our knowledgebase of over 48,000 articles and solutions.

Current Customers and Partners

Log in for full access

Log In
Close

Welcome! Check out the Getting Started with Red Hat page for quick tours and guides for common tasks.