Modify

Opened 16 years ago

Closed 16 years ago

Last modified 13 years ago

#3597 closed defect (fixed)

AttributeError: 'AccountLDAP' object has no attribute 'get_htdocs_dirs'

Reported by: Ryan Witt Owned by: Carlos López Pérez
Priority: normal Component: AccountLdapPlugin
Severity: normal Keywords: AccountLdapPlugin VotePlugin
Cc: Trac Release: 0.11

Description

When interacting with other ITemplateProvider plugins (such as VotePlugin, which is how I encountered this problem), AccountLdapPlugin does not implement the get_htdocs_dirs method, which breaks other plugins.

Here is the error:

Traceback (most recent call last):
  File "/usr/lib64/python2.5/site-packages/trac/web/main.py", line 423, in _dispatch_request
    dispatcher.dispatch(req)
  File "/usr/lib64/python2.5/site-packages/trac/web/main.py", line 197, in dispatch
    resp = chosen_handler.process_request(req)
  File "/usr/lib64/python2.5/site-packages/trac/web/chrome.py", line 364, in process_request
    in provider.get_htdocs_dirs() if dir[0] == prefix]:
AttributeError: 'AccountLDAP' object has no attribute 'get_htdocs_dirs'

Of course, this is pretty trivial to fix:

  • accountldap/accountldap.py

     
    94107    #
    95108    #---------------------------------------------- ITemplateProvider interface
    96109    #
     110    def get_htdocs_dirs(self):
     111        return []
     112
    97113    def get_templates_dirs(self):
    98114        from pkg_resources import resource_filename
    99115        return [resource_filename(__name__, 'templates')]

Attachments (0)

Change History (1)

comment:1 Changed 16 years ago by Carlos López Pérez

Resolution: fixed
Status: newclosed

Fixed in r4176

Modify Ticket

Change Properties
Set your email in Preferences
Action
as closed The owner will remain Carlos López Pérez.
The resolution will be deleted. Next status will be 'reopened'.

Add Comment


E-mail address and name can be saved in the Preferences.

 
Note: See TracTickets for help on using tickets.