Modify

Opened 8 years ago

Closed 8 years ago

Last modified 8 years ago

#12840 closed defect (fixed)

AttributeError: 'bool' object has no attribute 'lower'

Reported by: dennis.liou@… Owned by: Ryan J Ollos
Priority: normal Component: LdapPlugin
Severity: normal Keywords:
Cc: Trac Release:

Description (last modified by Ryan J Ollos)

Can any one help me debug the error?

Traceback (most recent call last):
  File "build/bdist.linux-x86_64/egg/trac/web/main.py", line 512, in _dispatch_request
    dispatcher.dispatch(req)
  File "build/bdist.linux-x86_64/egg/trac/web/main.py", line 221, in dispatch
    resp = chosen_handler.process_request(req)
  File "build/bdist.linux-x86_64/egg/trac/wiki/web_ui.py", line 134, in process_request
    req.perm(versioned_page.resource).require('WIKI_VIEW')
  File "build/bdist.linux-x86_64/egg/trac/perm.py", line 577, in require
    if not self._has_permission(action, resource):
  File "build/bdist.linux-x86_64/egg/trac/perm.py", line 568, in _has_permission
    check_permission(action, perm.username, resource, perm)
  File "build/bdist.linux-x86_64/egg/trac/perm.py", line 460, in check_permission
    perm)
  File "build/bdist.linux-x86_64/egg/trac/perm.py", line 294, in check_permission
    get_user_permissions(username)
  File "build/bdist.linux-x86_64/egg/trac/perm.py", line 396, in get_user_permissions
    for perm in self.store.get_user_permissions(username) or []:
  File "build/bdist.linux-x86_64/egg/ldapplugin/api.py", line 209, in get_user_permissions
    users += list(provider.get_permission_groups(username))
  File "build/bdist.linux-x86_64/egg/ldapplugin/api.py", line 108, in get_permission_groups
    self._ldap = LdapConnection(self.env.log, bind, **self._ldapcfg)
  File "build/bdist.linux-x86_64/egg/ldapplugin/api.py", line 540, in __init__
    self.__setattr__(k, v.lower() in _TRUE_VALUES)
AttributeError: 'bool' object has no attribute 'lower'

Attachments (0)

Change History (5)

comment:1 Changed 8 years ago by Ryan J Ollos

Description: modified (diff)

comment:2 Changed 8 years ago by Ryan J Ollos

Owner: changed from Sylvain Delisle to Ryan J Ollos
Status: newaccepted

as_bool in 0.12.2 or later can be used: [trac 10308#file4].

The change is simple, but I won't be able to test. Please let me know if the forthcoming change works for you.

comment:3 Changed 8 years ago by Ryan J Ollos

In 15688:

0.7.0dev: Use as_bool to convert values to boolean

as_bool will correctly handle multiple types, previously only
string types were handled in the code that is being replaced.

Refs #12840.

comment:4 Changed 8 years ago by Ryan J Ollos

Resolution: fixed
Status: acceptedclosed

Please reopen if you don't find the issue is resolved after reinstalling from the 0.12 branch.

comment:5 Changed 8 years ago by dennis.liou@…

Thanks, it works.

Modify Ticket

Change Properties
Set your email in Preferences
Action
as closed The owner will remain Ryan J Ollos.
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.