python3: replace execfile by exec function (#40570)
This commit is contained in:
parent
e43606f823
commit
45c0a44e89
|
@ -175,4 +175,4 @@ BIJOE_CACHE = True
|
|||
PAGE_LENGTH = 20
|
||||
|
||||
if 'BIJOE_SETTINGS_FILE' in os.environ:
|
||||
execfile(os.environ['BIJOE_SETTINGS_FILE'])
|
||||
exec(open(os.environ['BIJOE_SETTINGS_FILE']).read())
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
# This file is sourced by "execfile" from bijoe.settings
|
||||
# This file is sourced by "exec" from bijoe.settings
|
||||
|
||||
import os
|
||||
|
||||
|
@ -9,7 +9,7 @@ PROJECT_NAME = 'bijoe'
|
|||
#
|
||||
INSTALLED_APPS = INSTALLED_APPS + ('mellon',)
|
||||
|
||||
execfile('/usr/lib/hobo/debian_config_common.py')
|
||||
exec(open('/usr/lib/hobo/debian_config_common.py').read())
|
||||
|
||||
# SAML2 authentication
|
||||
AUTHENTICATION_BACKENDS = ('mellon.backends.SAMLBackend',)
|
||||
|
@ -32,7 +32,7 @@ INSTALLED_APPS = ('bijoe.hobo_agent',) + INSTALLED_APPS
|
|||
#
|
||||
# local settings
|
||||
#
|
||||
execfile(os.path.join(ETC_DIR, 'settings.py'))
|
||||
exec(open(os.path.join(ETC_DIR, 'settings.py')).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())
|
||||
|
|
|
@ -9,7 +9,7 @@
|
|||
# WARNING! Quick-start development settings unsuitable for production!
|
||||
# See https://docs.djangoproject.com/en/1.7/howto/deployment/checklist/
|
||||
|
||||
# This file is sourced by "execfile" from /usr/lib/bijoe/debian_config.py
|
||||
# This file is sourced by "exec" from /usr/lib/bijoe/debian_config.py
|
||||
|
||||
# SECURITY WARNING: don't run with debug turned on in production!
|
||||
DEBUG = False
|
||||
|
|
Loading…
Reference in New Issue