diff options
| author | Robert Myers <robert.myers@rackspace.com> | 2013-02-15 14:32:07 -0600 |
|---|---|---|
| committer | Robert Myers <robert.myers@rackspace.com> | 2013-02-15 14:32:07 -0600 |
| commit | 8ce59472653439d646309395bf195ec6163ff29a (patch) | |
| tree | 1470bc5159bfa71ab387cfea9c097bdee365a504 /openstack/common/setup.py | |
| parent | 7417a6024c7fe093a54f07a1ea4f24bdd0fcc3e6 (diff) | |
| download | oslo-8ce59472653439d646309395bf195ec6163ff29a.tar.gz oslo-8ce59472653439d646309395bf195ec6163ff29a.tar.xz oslo-8ce59472653439d646309395bf195ec6163ff29a.zip | |
Change the check for the existence of .git directory.
In common setup the check for the .git directory is too
restrictive. Instead of checking that it is a directory just
check to see if it exists. That way if the project is part
of a submodule it will continue to work correctly.
Change-Id: If6b6531ab5778ac17537e3f18bde1844620c8316
Fixes: bug 1126416
Diffstat (limited to 'openstack/common/setup.py')
| -rw-r--r-- | openstack/common/setup.py | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/openstack/common/setup.py b/openstack/common/setup.py index 2a971e7..22f864d 100644 --- a/openstack/common/setup.py +++ b/openstack/common/setup.py @@ -131,7 +131,7 @@ def write_git_changelog(): """Write a changelog based on the git changelog.""" new_changelog = 'ChangeLog' if not os.getenv('SKIP_WRITE_GIT_CHANGELOG'): - if os.path.isdir('.git'): + if os.path.exists('.git'): git_log_cmd = 'git log --stat' changelog = _run_shell_command(git_log_cmd) mailmap = parse_mailmap() @@ -147,7 +147,7 @@ def generate_authors(): old_authors = 'AUTHORS.in' new_authors = 'AUTHORS' if not os.getenv('SKIP_GENERATE_AUTHORS'): - if os.path.isdir('.git'): + if os.path.exists('.git'): # don't include jenkins email address in AUTHORS file git_log_cmd = ("git log --format='%aN <%aE>' | sort -u | " "egrep -v '" + jenkins_email + "'") @@ -279,7 +279,7 @@ def _get_version_from_git(pre_version): revision if there is one, or tag plus number of additional revisions if the current revision has no tag.""" - if os.path.isdir('.git'): + if os.path.exists('.git'): if pre_version: try: return _run_shell_command( |
