Skip to content

Commit 9c5de53

Browse files
committed
Added virtualenv support to wsgi.py
- Legacy-Id: 9467
1 parent bcfa6f4 commit 9c5de53

1 file changed

Lines changed: 6 additions & 0 deletions

File tree

ietf/wsgi.py

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -42,6 +42,12 @@
4242
import sys
4343

4444
path = os.path.dirname(os.path.dirname(os.path.abspath(__file__)))
45+
46+
# Virtualenv support
47+
virtualenv_activation = os.path.join(path, "bin", "activate_this.py")
48+
if os.path.exists(virtualenv_activation):
49+
execfile(virtualenv_activation, dict(__file__=virtualenv_activation))
50+
4551
if not path in sys.path:
4652
sys.path.insert(0, path)
4753

0 commit comments

Comments
 (0)