diff --git a/bijoe/settings.py b/bijoe/settings.py index 2a57b61..b115aaa 100644 --- a/bijoe/settings.py +++ b/bijoe/settings.py @@ -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()) diff --git a/debian/debian_config.py b/debian/debian_config.py index 00dbe92..d75262a 100644 --- a/debian/debian_config.py +++ b/debian/debian_config.py @@ -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()) diff --git a/debian/settings.py b/debian/settings.py index 9cb3cf9..6cb5f8d 100644 --- a/debian/settings.py +++ b/debian/settings.py @@ -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