diff options
| author | Jenkins <jenkins@review.openstack.org> | 2016-03-21 15:58:59 +0000 |
|---|---|---|
| committer | Gerrit Code Review <review@openstack.org> | 2016-03-21 15:58:59 +0000 |
| commit | 0cb38df60ff62fbee1969c80761b822bb5672c5f (patch) | |
| tree | 7991bbd06fc70501d440c7c22412866c37b2f5e8 | |
| parent | 11adcd546b9cef4ebfa9cefe931e2108b3f50a80 (diff) | |
| parent | 76e0c09f344f7acf8704440faebf0ea73af1e20c (diff) | |
| download | kolla-0cb38df60ff62fbee1969c80761b822bb5672c5f.tar.gz kolla-0cb38df60ff62fbee1969c80761b822bb5672c5f.zip | |
Merge "Allow version_check to work on local git repo"
| -rwxr-xr-x | tools/version_check.py | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/tools/version_check.py b/tools/version_check.py index 99fb16712..109dc0771 100755 --- a/tools/version_check.py +++ b/tools/version_check.py @@ -13,6 +13,7 @@ # limitations under the License. import collections +import os import re import sys @@ -21,6 +22,15 @@ from oslo_config import cfg import pkg_resources import requests +PROJECT_ROOT = os.path.abspath(os.path.join( + os.path.dirname(os.path.realpath(__file__)), '..')) + +# NOTE(SamYaple): Update the search patch to prefer PROJECT_ROOT as the source +# of packages to import if we are using local tools/build.py +# instead of pip installed kolla-build tool +if PROJECT_ROOT not in sys.path: + sys.path.insert(0, PROJECT_ROOT) + from kolla.common import config as common_config |
