Skip to content

Commit

Permalink
erratum: do not decode errata status
Browse files Browse the repository at this point in the history
Take the status value from the JSON as-is. No need to decode the value.

This fixes an error on Python 3 where this decode() call would change
the value to a bytes type, which caused further errors in _fetch() when
trying to compare that bytes value with strings like 'QE'.
  • Loading branch information
ktdreyer committed Mar 23, 2017
1 parent 9d507a5 commit e8cc120
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions errata_tool/erratum.py
Original file line number Diff line number Diff line change
Expand Up @@ -175,9 +175,8 @@ def _fetch(self, errata_id):
break

self.errata_id = erratum['id']
# NEW_FILES QE etc. - decode from unicode
v = erratum['status']
self.errata_state = v.encode('ascii', 'ignore')
# NEW_FILES QE etc.
self.errata_state = erratum['status']
self._original_state = self.errata_state

# Check if the erratum is under embargo
Expand Down

0 comments on commit e8cc120

Please sign in to comment.