xixuan | cf58dd3 | 2016-08-24 20:57:06 | [diff] [blame] | 1 | # Copyright (c) 2016 The Chromium OS Authors. All rights reserved. |
| 2 | # 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 | |
| 7 | from __future__ import print_function |
| 8 | |
| 9 | import os |
| 10 | import 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) |
| 15 | if _path not in sys.path: |
| 16 | sys.path.insert(0, os.path.abspath(_path)) |
| 17 | |
| 18 | del _path |