From e563b6e30db8ea9f327483900a0bf716552fa730 Mon Sep 17 00:00:00 2001 From: Robert Sparks Date: Mon, 8 Mar 2021 17:40:45 +0000 Subject: [PATCH] Remove the check for activate_this from wsgi.py since modern venv doesn't provide that script. Change the logging to always log when starting a wsgi instance. - Legacy-Id: 18908 --- ietf/wsgi.py | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/ietf/wsgi.py b/ietf/wsgi.py index 13cf05d6c..104024a37 100644 --- a/ietf/wsgi.py +++ b/ietf/wsgi.py @@ -51,17 +51,13 @@ path = os.path.dirname(os.path.dirname(os.path.abspath(__file__))) syslog.openlog(str("datatracker"), syslog.LOG_PID, syslog.LOG_USER) -# Virtualenv support -virtualenv_activation = os.path.join(path, "env", "bin", "activate_this.py") -if os.path.exists(virtualenv_activation): - syslog.syslog("Starting datatracker wsgi with virtualenv %s" % os.path.dirname(os.path.dirname(virtualenv_activation))) - exec(compile(io.open(virtualenv_activation, "rb").read(), virtualenv_activation, 'exec'), dict(__file__=virtualenv_activation)) - if not path in sys.path: sys.path.insert(0, path) os.environ.setdefault("DJANGO_SETTINGS_MODULE", "ietf.settings") +syslog.syslog("Starting datatracker wsgi instance") + from django.core.wsgi import get_wsgi_application application = get_wsgi_application()