Files
zulip/tools/lib/sanity_check.py
sinwar eab355b0cd tools: Create more consistent checks for venv.
This helps make the Zulip development environment somewhat more robust
to new contributors, since it will give them a nice warning if they
try running any of our development tools outside the Zulip virtualenv.

Fixes #3468.
2017-02-06 21:50:32 -08:00

14 lines
374 B
Python

#!/usr/bin/env python
from __future__ import print_function
import sys
def check_venv(filename):
# type: (str) -> None
try:
import ujson
except ImportError:
print("You need to run %s inside a Zulip dev environment." % (filename,))
print("If you are using Vagrant, you can `vagrant ssh` to enter the Vagrant guest.")
sys.exit(1)