From 297b62efc64ddad7fa1c7c10ed2eb55b572f5dd0 Mon Sep 17 00:00:00 2001 From: Tim Abbott Date: Fri, 6 Oct 2017 16:37:56 -0700 Subject: [PATCH] log2zulip: Use simpler code for accessing production venv. The only problem with this resulting code is that setup_path_on_import only works if the Python versions are the same, so you need to run this with Python 3 in that case. We try to resolve that for use on Zulip servers with zulip/zulip:47c5aae5b242fb6d2f5e860602e0fc0af68419bb; since that's the main case where the code path runs, that should be good enough. --- zulip/integrations/log2zulip/log2zulip | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/zulip/integrations/log2zulip/log2zulip b/zulip/integrations/log2zulip/log2zulip index fdb5c19..d0d922f 100755 --- a/zulip/integrations/log2zulip/log2zulip +++ b/zulip/integrations/log2zulip/log2zulip @@ -14,7 +14,7 @@ import traceback try: # Use the Zulip virtualenv if available - sys.path.append(os.path.join(os.path.dirname(__file__), "../../..")) + sys.path.append("/home/zulip/deployments/current") import scripts.lib.setup_path_on_import except ImportError: pass