Skip to content

Commit

Permalink
Fix unicode error in changelog generation
Browse files Browse the repository at this point in the history
  • Loading branch information
abadger committed Jul 5, 2019
1 parent 4f642da commit fed90ef
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions packaging/release/changelogs/changelog.py
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@

from ansible import constants as C
from ansible.module_utils.six import string_types
from ansible.module_utils._text import to_bytes

BASE_DIR = os.path.abspath(os.path.join(os.path.dirname(__file__), '..', '..', '..'))
CHANGELOG_DIR = os.path.join(BASE_DIR, 'changelogs')
Expand Down Expand Up @@ -285,8 +286,8 @@ def generate_changelog(changes, plugins, fragments):
generator = ChangelogGenerator(config, changes, plugins, fragments)
rst = generator.generate()

with open(changelog_path, 'w') as changelog_fd:
changelog_fd.write(rst)
with open(changelog_path, 'wb') as changelog_fd:
changelog_fd.write(to_bytes(rst))


class ChangelogFragmentLinter(object):
Expand Down

0 comments on commit fed90ef

Please sign in to comment.