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, tools, and much more.

Current Customers and Partners

Log in for full access

Log In

New to Red Hat?

Learn more about Red Hat subscriptions

Using a Red Hat product through a public cloud?

How to access this content