Skip to content

Commit

Permalink
changelog: output string does not need to be encoded.
Browse files Browse the repository at this point in the history
Otherwise you get an ugly one-liner with b'' on Python 3.
  • Loading branch information
mauritsvanrees committed Aug 21, 2019
1 parent 1e047b7 commit 72e6620
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions plone/releaser/changelog.py
Original file line number Diff line number Diff line change
Expand Up @@ -183,7 +183,7 @@ def build_unified_changelog(start_version, end_version):
print(e)
return

output_str = ""
output_str = u""
try:
for package, version in six.iteritems(current_versions):
if package in prior_versions:
Expand Down Expand Up @@ -212,7 +212,7 @@ def build_unified_changelog(start_version, end_version):
except ValueError as e:
print(e)
else:
bullet = "- "
bullet = u"- "
for change in changes:
if change in HEADINGS:
output_str += change + u"\n\n"
Expand All @@ -226,5 +226,4 @@ def build_unified_changelog(start_version, end_version):
pass
except KeyboardInterrupt:
pass

print(output_str.encode("utf-8"))
print(output_str)

0 comments on commit 72e6620

Please sign in to comment.