Skip to content

Commit

Permalink
Fixed bytes/unicode error in 'manage changelog'.
Browse files Browse the repository at this point in the history
  • Loading branch information
mauritsvanrees committed Aug 21, 2019
1 parent 8c90f40 commit 1e047b7
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions plone/releaser/changelog.py
Original file line number Diff line number Diff line change
Expand Up @@ -28,10 +28,12 @@ def pull_versions(version_number):
if versions_file.code == 404:
raise ValueError("Version %s not found." % version_number)
for line in versions_file:
line = line.strip().replace(" ", "")
if line and not (line.startswith("#") or line.startswith("[")):
if not isinstance(line, type(u"")):
line = line.decode("utf-8")
line = line.strip().replace(u" ", u"")
if line and not (line.startswith(u"#") or line.startswith(u"[")):
try:
package, version = line.split("=")
package, version = line.split(u"=")
version = LooseVersion(version)
except ValueError:
pass
Expand Down

0 comments on commit 1e047b7

Please sign in to comment.