blob: 9303c6279692aca9d4ba8c31f237ceee83ec1762 [file] [log] [blame]
# Copyright 2016 The ChromiumOS Authors
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
"""Set up syspath to import chromite."""
from __future__ import print_function
import os
import sys
# Make sure that chromite is available to import.
_path = os.path.join(os.path.dirname(__file__), os.pardir, os.pardir, os.pardir)
if _path not in sys.path:
sys.path.insert(0, os.path.abspath(_path))
# TODO(xixuan):
# delete this once there's no third-party packages in chromite.
import chromite # pylint: disable=unused-import
except ImportError as e:
chromite = None
del _path