diff options
author | Jenkins <jenkins@review.openstack.org> | 2013-07-12 04:46:12 +0000 |
---|---|---|
committer | Gerrit Code Review <review@openstack.org> | 2013-07-12 04:46:12 +0000 |
commit | 8809f523684d3da5377723dab1fbe34ce428621d (patch) | |
tree | 5667dcb9855b95b21b9e7d17d6fa7317916285ba | |
parent | 313866f845dce197fe53288f3bcf400ebbcf3c9b (diff) | |
parent | 04b4933575cf8f90f77855fcf8ba6447ff94cf60 (diff) | |
download | pbr-8809f523684d3da5377723dab1fbe34ce428621d.tar.gz |
Merge "Put AUTHORS.in at the top of AUTHORS." into feature/merged2to1
-rw-r--r-- | pbr/packaging.py | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/pbr/packaging.py b/pbr/packaging.py index 97f95a8..062a844 100644 --- a/pbr/packaging.py +++ b/pbr/packaging.py @@ -268,7 +268,7 @@ def generate_authors(git_dir=None, dest_dir='.', option_dict=dict()): if not should_skip: old_authors = os.path.join(dest_dir, 'AUTHORS.in') new_authors = os.path.join(dest_dir, 'AUTHORS') - # If there's already a ChangeLog and it's not writable, just use it + # If there's already an AUTHORS file and it's not writable, just use it if (os.path.exists(new_authors) and not os.access(new_authors, os.W_OK)): return @@ -293,11 +293,11 @@ def generate_authors(git_dir=None, dest_dir='.', option_dict=dict()): mailmap = read_git_mailmap(git_dir) with open(new_authors, 'wb') as new_authors_fh: - new_authors_fh.write(canonicalize_emails( - changelog, mailmap).encode('utf-8')) if os.path.exists(old_authors): with open(old_authors, "rb") as old_authors_fh: - new_authors_fh.write(b'\n' + old_authors_fh.read()) + new_authors_fh.write(old_authors_fh.read()) + new_authors_fh.write(canonicalize_emails( + changelog, mailmap).encode('utf-8')) _rst_template = """%(heading)s |