misc: replace execfile by exec
This commit is contained in:
parent
889dd552d2
commit
1e9878e972
|
@ -199,4 +199,4 @@ CORBO_PHONE_SEARCH_DIGITS = 9
|
||||||
local_settings_file = os.environ.get('CORBO_SETTINGS_FILE',
|
local_settings_file = os.environ.get('CORBO_SETTINGS_FILE',
|
||||||
os.path.join(os.path.dirname(__file__), 'local_settings.py'))
|
os.path.join(os.path.dirname(__file__), 'local_settings.py'))
|
||||||
if os.path.exists(local_settings_file):
|
if os.path.exists(local_settings_file):
|
||||||
execfile(local_settings_file)
|
exec(open(local_settings_file).read())
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
# This file is sourced by "execfile" from corbo.settings
|
# This file is sourced by "exec" from corbo.settings
|
||||||
|
|
||||||
import os
|
import os
|
||||||
|
|
||||||
|
@ -7,14 +7,14 @@ PROJECT_NAME = 'corbo'
|
||||||
#
|
#
|
||||||
# hobotization (multitenant)
|
# hobotization (multitenant)
|
||||||
#
|
#
|
||||||
execfile('/usr/lib/hobo/debian_config_common.py')
|
exec(open('/usr/lib/hobo/debian_config_common.py').read())
|
||||||
|
|
||||||
INSTALLED_APPS = ('corbo.hobo_agent', ) + INSTALLED_APPS
|
INSTALLED_APPS = ('corbo.hobo_agent', ) + INSTALLED_APPS
|
||||||
|
|
||||||
#
|
#
|
||||||
# local settings
|
# local settings
|
||||||
#
|
#
|
||||||
execfile(os.path.join(ETC_DIR, 'settings.py'))
|
exec(open(os.path.join(ETC_DIR, 'settings.py')).read())
|
||||||
|
|
||||||
# run additional settings snippets
|
# 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!
|
# WARNING! Quick-start development settings unsuitable for production!
|
||||||
# See https://docs.djangoproject.com/en/1.7/howto/deployment/checklist/
|
# See https://docs.djangoproject.com/en/1.7/howto/deployment/checklist/
|
||||||
|
|
||||||
# This file is sourced by "execfile" from /usr/lib/corbo/debian_config.py
|
# This file is sourced by "exec" from /usr/lib/corbo/debian_config.py
|
||||||
|
|
||||||
# SECURITY WARNING: don't run with debug turned on in production!
|
# SECURITY WARNING: don't run with debug turned on in production!
|
||||||
DEBUG = False
|
DEBUG = False
|
||||||
|
|
Reference in New Issue