Modify

Opened 9 months ago

#11469 new defect

Exceptions in AccountModule._reset_password_enabled are not trapped in Trac 1.0.2dev

Reported by: rjollos Owned by: hasienda
Priority: normal Component: AccountManagerPlugin
Severity: normal Keywords:
Cc: Trac Release:

Description

While investigating #10980 using Trac 1.0.2dev, with the reporter's configuration I immediately saw a warning:

close Warning: Error with navigation contributor "AccountModule"

It looks like some changes are needed after [trac 12068].

  • accountmanagerplugin/trunk/acct_mgr/web_ui.py

    diff --git a/accountmanagerplugin/trunk/acct_mgr/web_ui.py b/accountmanagerplugi
    index 0611206..3713dfe 100644
    a b from genshi.builder import tag 
    1919 
    2020from trac import perm, util 
    2121from trac.core import Component, implements 
    22 from trac.config import Configuration, BoolOption, IntOption, Option 
     22from trac.config import Configuration, ConfigurationError, BoolOption, \ 
     23                        IntOption, Option 
    2324from trac.env import open_environment 
    2425from trac.prefs import IPreferencePanelProvider 
    2526from trac.util import hex_entropy 
    class AccountModule(CommonTemplateProvider): 
    106107    def _reset_password_enabled(self, log=False): 
    107108        try: 
    108109            self.store.hash_method 
    109         except AttributeError: 
     110        except (AttributeError, ConfigurationError): 
    110111            return False 
    111112        return is_enabled(self.env, self.__class__) and \ 
    112113               self.reset_password and (self._write_check(log) != []) and \ 

Attachments (0)

Change History (0)

Add Comment

Modify Ticket

Action
as new .
Author


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

 
Note: See TracTickets for help on using tickets.