Description of problem: # ipa-addservice Traceback (most recent call last): File "/usr/sbin/ipa-addservice", line 79, in <module> except xmlrpclib.Fault, fault: NameError: name 'xmlrpclib' is not defined Looking at the code, it appears the 'import xmlrpclib' block is in the wrong place. It is inside the earlier 'try' statement, so is out of scope when python tries to process the 'except xmlrpclib' code. Version-Release number of selected component (if applicable): ipa-admintools-0.99-12.fc9.x86_64 How reproducible: Always Steps to Reproduce: 1.Run "ipa-addservice" 2. 3. Actual results: Expected results: Traceback (most recent call last): File "/usr/sbin/ipa-addservice", line 79, in <module> except xmlrpclib.Fault, fault: NameError: name 'xmlrpclib' is not defined Additional info:
Yes, I saw this too in another program. Went a little nuts trying to let the user hit ^C without seeing a backtrace if they did it during the import stage. If you move the imports to the top of the file you'll be able to see the root cause of the failure. Can you do that so I try to tackle that as well?
I had todo several things: - Move all the import statements to the top of ipa-addservice - Add a missing 'import ldap' statement to ipa.py, or equivalently move 'import ldap' before 'import ipa'. The former is better though. - Install the 'python-ldap' RPM - a missing Requires: on ipa-admintools RPM spec Then i finally got the error i was expecting # ipa-addservice IPA server not found in DNS, in the config file (/etc/ipa/ipa.conf) or on the command line.
Changing version to '9' as part of upcoming Fedora 9 GA. More information and reason for this action is here: http://fedoraproject.org/wiki/BugZappers/HouseKeeping
This was fixed upstream as a side-effect of bug 443987.
Verified against 1.1.0-2.20081119.el5ipa [root@ipaqa-64vm ~]# ipa-addservice usage: ipa-addservice [options] principal ipa-addservice: error: no principal specified [root@ipaqa-64vm ~]# echo $? 2