| Trees | Indices | Help |
|
|---|
|
|
1 # -*- coding: utf-8 -*- 2 # 3 # Copyright (C) 2015-2020 Edgewall Software 4 # All rights reserved. 5 # 6 # This software is licensed as described in the file COPYING, which 7 # you should have received as part of this distribution. The terms 8 # are also available at https://trac.edgewall.org/wiki/TracLicense. 9 # 10 # This software consists of voluntary contributions made by many 11 # individuals. For the exact contribution history, see the revision 12 # history and logs, available at https://trac.edgewall.org/log/. 13 14 import os 15 16 from trac.upgrades import backup_config_file 17 1820 """Change [authz_policy] authz_file to be relative to the `conf` 21 directory. 22 """ 23 authz_file = env.config.get('authz_policy', 'authz_file') 24 if authz_file and not os.path.isabs(authz_file): 25 parts = os.path.split(authz_file) 26 if len(parts) == 2 and parts[0] == 'conf': 27 env.config.set('authz_policy', 'authz_file', parts[1]) 28 backup_config_file(env, '.db36.bak') 29 env.config.save()30
| Trees | Indices | Help |
|
|---|
| Generated by Epydoc 3.0.1 on Wed Jul 5 01:50:18 2023 | http://epydoc.sourceforge.net |