devserver: move scripts to venv.
There's a dependency error in importing google.protobuf.descriptor.
To avoid further troubles, this CL tends to move monitor scripts for
devserver to venv.
BUG=chromium:708890
TEST=Run bin/apache_log_metrics & bin/tail_until_writer_finished.
Change-Id: Ib1b69e12aea1e09c3d2c6a3d41bc796070d9daa0
Reviewed-on: https://chromium-review.googlesource.com/490707
Commit-Ready: Xixuan Wu <xixuan@chromium.org>
Tested-by: Xixuan Wu <xixuan@chromium.org>
Reviewed-by: Xixuan Wu <xixuan@chromium.org>
diff --git a/setup_chromite.py b/setup_chromite.py
index 8bd2d38..2d42373 100644
--- a/setup_chromite.py
+++ b/setup_chromite.py
@@ -1,4 +1,4 @@
-# Copyright (c) 2016 The Chromium OS Authors. All rights reserved.
+# Copyright 2016 The Chromium OS Authors. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
@@ -15,4 +15,11 @@
if _path not in sys.path:
sys.path.insert(0, os.path.abspath(_path))
+# TODO(xixuan): crbug.com/717173
+# delete this once there's no third-party packages in chromite.
+try:
+ import chromite # pylint: disable=unused-import
+except ImportError as e:
+ chromite = None
+
del _path