blob: 094887efe9f7076aeeb94c3a46806baa9ff25238 [file] [log] [blame]
Mike Frysinger8b0fc372022-09-08 07:24:241# Copyright 2016 The ChromiumOS Authors
xixuancf58dd32016-08-24 20:57:062# Use of this source code is governed by a BSD-style license that can be
3# found in the LICENSE file.
4
5"""Set up syspath to import chromite."""
6
7from __future__ import print_function
8
9import os
10import sys
11
12# Make sure that chromite is available to import.
13_path = os.path.join(os.path.dirname(__file__), os.pardir, os.pardir,
14 os.pardir)
15if _path not in sys.path:
16 sys.path.insert(0, os.path.abspath(_path))
17
xixuanebdb0a82017-04-28 18:25:0218# TODO(xixuan): crbug.com/717173
19# delete this once there's no third-party packages in chromite.
20try:
21 import chromite # pylint: disable=unused-import
22except ImportError as e:
23 chromite = None
24
xixuancf58dd32016-08-24 20:57:0625del _path