Skip to content

Commit

Permalink
Fixes #15304: ncf api fails to run on python 3
Browse files Browse the repository at this point in the history
  • Loading branch information
peckpeck committed Jul 25, 2019
1 parent 739598f commit e689c9c
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion rudder-webapp/SOURCES/ncf_api_flask_app.wsgi
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,10 @@ virtualenv_path = '/usr/share/ncf-api-virtualenv'

# Virtualenv initialization
activate_this = virtualenv_path + '/bin/activate_this.py'
execfile(activate_this, dict(__file__=activate_this))
if sys.version_info[0] == 2:
execfile(activate_this, dict(__file__=activate_this))
else:
exec(open(activate_this).read(), dict(__file__=activate_this))

# Append ncf API path to the current one
sys.path.append(ncf_path)
Expand Down

0 comments on commit e689c9c

Please sign in to comment.