user exec() instead of execfile() (#38923)

This commit is contained in:
Emmanuel Cazenave 2020-01-08 11:35:39 +01:00
parent e195b4ea6d
commit 216bdc1cfd
2 changed files with 4 additions and 4 deletions

View File

@ -10,7 +10,7 @@ PROJECT_NAME = 'passerelle'
#
# hobotization (multitenant)
#
execfile('/usr/lib/hobo/debian_config_common.py')
exec(open('/usr/lib/hobo/debian_config_common.py').read())
# disable django-mellon autologin
MELLON_OPENED_SESSION_COOKIE_NAME = None
@ -22,7 +22,7 @@ LOGGING['loggers']['suds'] = {
'propagate': True,
}
execfile('/etc/%s/settings.py' % PROJECT_NAME)
exec(open('/etc/%s/settings.py' % PROJECT_NAME).read())
# run additional settings snippets
execfile('/usr/lib/hobo/debian_config_settings_d.py')
exec(open('/usr/lib/hobo/debian_config_settings_d.py').read())

View File

@ -246,4 +246,4 @@ LOGGING = {
local_settings_file = os.environ.get('PASSERELLE_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())