Commit 34db74dd authored by Michal Čihař's avatar Michal Čihař

Replace execfile() with exec(open().read())

...for compatibility with Python 3.
Signed-off-by: default avatarMichal Čihař <michal@cihar.com>
parent 57f3198e
......@@ -22,4 +22,4 @@ import os
VIRTENV = os.environ['OPENSHIFT_PYTHON_DIR'] + '/virtenv/'
VIRTUALENV = os.path.join(VIRTENV, 'bin/activate_this.py')
execfile(VIRTUALENV, dict(__file__=VIRTUALENV))
exec(open(VIRTUALENV).read(), dict(__file__=VIRTUALENV))
......@@ -28,8 +28,8 @@ sys.path.append(os.path.join(os.environ['OPENSHIFT_REPO_DIR'], 'openshift'))
os.environ['DJANGO_SETTINGS_MODULE'] = 'weblate.settings_openshift'
execfile(os.path.join(
exec(open(os.path.join(
os.environ['OPENSHIFT_REPO_DIR'], 'openshift', 'virtualenv.py'
))
)).read())
application = get_wsgi_application()
......@@ -22,9 +22,9 @@
import os
from string import Template
execfile(os.path.join(
exec(open(os.path.join(
os.environ['OPENSHIFT_REPO_DIR'], 'openshift', 'virtualenv.py'
))
)).read())
def application(environ, start_response):
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment