Leaving out the password option throws an error. Readme suggests this should be valid.
If you miss out the password=xxxxx bit (or leave it set to None), you'll be prompted for it.
Configuration:
[mysatellite.com]
login=admin
Exception:
Python 2.7.5 (default, Feb 19 2014, 13:47:28)
[GCC 4.8.2 20131212 (Red Hat 4.8.2-7)] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> import rhnapi
>>> RHN = rhnapi.rhnSession('mysatellite.com', config='~/.rhninfo')
Jun 6 08:02:40 RHN API[9064]: INFO - looking up config info in ~/.rhninfo
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "/home/dekimsey/.virtualenvs/satellite/lib/python2.7/site-packages/rhnapi/__init__.py", line 373, in __init__
self.login, self._password = fetchCreds(self.configfile, self.hostname, self.logger, self.debug)
File "/home/dekimsey/.virtualenvs/satellite/lib/python2.7/site-packages/rhnapi/__init__.py", line 190, in fetchCreds
mypass = confparse.get(servername, 'password')
File "/usr/lib64/python2.7/ConfigParser.py", line 618, in get
raise NoOptionError(option, section)
ConfigParser.NoOptionError: No option 'password' in section: 'rhn.cns.ufl.edu'
Ah, that's due to a lack of a [defaults] section, I expect. The provided template file has one. I'm loath to add the defaults into the constructor, as that hardcodes the entry.
Leaving out the password option throws an error. Readme suggests this should be valid.
Exception: