Bug 499235

Summary: could not load plugin module plugin.py when running most ipa cli commands
Product: [Retired] freeIPA Reporter: Michael Gregg <mgregg>
Component: ipa-admintoolsAssignee: Rob Crittenden <rcritten>
Status: CLOSED UPSTREAM QA Contact: Chandrasekar Kannan <ckannan>
Severity: medium Docs Contact:
Priority: low    
Version: unspecifiedCC: benl, dpal
Target Milestone: ---   
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2012-03-28 09:31:59 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Bug Depends On:    
Bug Blocks: 431020    

Description Michael Gregg 2009-05-05 17:49:00 UTC
Description of problem:
This behaviour started with this mornings build.
Syntax error upon running most cli commands

Version-Release number of selected component (if applicable):
2.0-2.20090505.el5ipa

How reproducible:
always

Steps to Reproduce:
1. Install ipa
2. kinit as admin
3. ipa user-find admin
  
Actual results:
/usr/bin/ipa user-find admin
ipa: ERROR: could not load plugin module '/usr/lib/python2.4/site-packages/ipalib/plugins/join.py'
ipa: ERROR: SyntaxError: invalid syntax (certdb.py, line 27)
Traceback (most recent call last):
  File "/usr/lib/python2.4/site-packages/ipalib/cli.py", line 739, in run
    api.load_plugins()
  File "/usr/lib/python2.4/site-packages/ipalib/plugable.py", line 649, in load_plugins
    self.import_plugins('ipalib')
  File "/usr/lib/python2.4/site-packages/ipalib/plugable.py", line 685, in import_plugins
    raise e
  File "/usr/lib/python2.4/site-packages/ipapython/certdb.py", line 27
     class CertDB():
                  ^
 SyntaxError: invalid syntax
ipa: ERROR: an internal error has occured

Comment 1 Rob Crittenden 2009-05-05 17:59:35 UTC
A python 2.4-ism.

For a quick fix you can edit 
/usr/lib/python2.4/site-packages/ipapython/certdb.py

And change it to: class CertDB(object):

You'll need to restart the httpd service too.

Comment 2 Rob Crittenden 2009-05-05 18:06:08 UTC
master: 82223f3ed1893ee4bd6b1276cc9bcf82711bfc7a

Comment 3 Michael Gregg 2009-05-05 18:25:43 UTC
Adding the change to certdb.py looks good.

Thanks for the quick fix.