python3: replace execfile usage

This commit is contained in:
Frédéric Péters 2020-01-19 17:55:45 +01:00
parent 1d0e1a2f21
commit 930f110872
2 changed files with 3 additions and 3 deletions

View File

@ -7,7 +7,7 @@ PROJECT_NAME = 'scrutiny'
DEBUG = False
TEMPLATE_DEBUG = False
SECRET_KEY = file('/etc/%s/secret' % PROJECT_NAME).read()
SECRET_KEY = open('/etc/%s/secret' % PROJECT_NAME).read()
ADMINS = (
('Tous', 'root@localhost'),
@ -39,4 +39,4 @@ DATABASES = {
#
# local settings
#
execfile(os.path.join(ETC_DIR, 'settings.py'))
exec(open(os.path.join(ETC_DIR, 'settings.py')).read())

View File

@ -148,4 +148,4 @@ REDMINE_API_KEY = None
local_settings_file = os.environ.get('SCRUTINY_SETTINGS_FILE',
os.path.join(os.path.dirname(__file__), 'local_settings.py'))
if os.path.exists(local_settings_file):
execfile(local_settings_file)
exec(open(local_settings_file).read())