Zulip server and web application. Open-source team chat that helps teams stay productive and focused.
sanity_check: Test for the virtualenv by its path.
Anders Kaseorg42aa91696758
diff --git a/tools/lib/sanity_check.py b/tools/lib/sanity_check.pyindex ebb125e2e86..113abd81925 100644--- a/tools/lib/sanity_check.py+++ b/tools/lib/sanity_check.py@@ -4,17 +4,7 @@ import sysdef check_venv(filename: str) -> None:- try:- # Here we import 3 modules that we expect to be in any valid- # Zulip virtualenv but are unlikely to all be present on a- # host system to help check whether we're in Vagrant.- import bitfield- import django- import zulip- bitfield- django- zulip- except ImportError:+ if os.path.basename(sys.prefix) != "zulip-py3-venv":print(f"You need to run {filename} inside a Zulip dev environment.")user_id = os.getuid()user_name = pwd.getpwuid(user_id).pw_name