Edgewall Software

Ticket #2498: patch-2498.2.diff

File patch-2498.2.diff, 695 bytes (added by Manuzhai, 6 years ago)

Fix #2498 by delaying the database initialization.

  • trac/env.py

     
    7676 
    7777        self.path = path 
    7878        self.load_config() 
    79         self.setup_log()  
    80  
    8179        from trac.loader import load_components 
    82         load_components(self) 
    83  
    8480        if create: 
    8581            self.create(options) 
     82            self.setup_log() 
     83            load_components(self) 
     84            DatabaseManager(self).init_db() 
    8685        else: 
    8786            self.verify() 
     87            self.setup_log() 
     88            load_components(self) 
    8889 
    8990        if create: 
    9091            for setup_participant in self.setup_participants: