log2zulip: Adjust for zulip setup_path_on_import → setup_path change.

687553a661

Signed-off-by: Anders Kaseorg <anders@zulipchat.com>
This commit is contained in:
Anders Kaseorg 2020-04-18 15:23:39 -07:00 committed by Tim Abbott
parent 1a417b1610
commit 953709fdd5

View file

@ -11,12 +11,17 @@ import subprocess
import tempfile
import traceback
# Use the Zulip virtualenv if available
sys.path.append("/home/zulip/deployments/current")
try:
# Use the Zulip virtualenv if available
sys.path.append("/home/zulip/deployments/current")
import scripts.lib.setup_path_on_import
from scripts.lib.setup_path import setup_path
setup_path()
except ImportError:
pass
try:
import scripts.lib.setup_path_on_import
scripts.lib.setup_path_on_import # Suppress unused import warning
except ImportError:
pass
import json