| Index: common/eslint/eslint/__init__.py
|
| diff --git a/common/eslint/eslint/__init__.py b/common/eslint/eslint/__init__.py
|
| new file mode 100644
|
| index 0000000000000000000000000000000000000000..bd6c184c766d30ccfd2eabeb9f6aa1ea768207db
|
| --- /dev/null
|
| +++ b/common/eslint/eslint/__init__.py
|
| @@ -0,0 +1,24 @@
|
| +# Copyright 2016 The Chromium Authors. All rights reserved.
|
| +# Use of this source code is governed by a BSD-style license that can be
|
| +# found in the LICENSE file.
|
| +
|
| +import os
|
| +import sys
|
| +
|
| +
|
| +_CATAPULT_PATH = os.path.join(
|
| + os.path.dirname(os.path.abspath(__file__)),
|
| + os.path.pardir, os.path.pardir, os.path.pardir)
|
| +
|
| +
|
| +def _AddToPathIfNeeded(path):
|
| + if path not in sys.path:
|
| + sys.path.insert(0, path)
|
| +
|
| +
|
| +def _UpdateSysPathIfNeeded():
|
| + _AddToPathIfNeeded(os.path.join(_CATAPULT_PATH, 'common', 'node_runner'))
|
| + _AddToPathIfNeeded(os.path.join(_CATAPULT_PATH, 'common', 'py_utils'))
|
| +
|
| +
|
| +_UpdateSysPathIfNeeded()
|
|
|