[Trivial] Assign value after the encode

In the previous fix [1] the value of pubkey.encode() was
forgotten to be assigned which basically makes it a noop
operation. This patch fixes that.

[1] https://review.opendev.org/c/osf/refstack/+/776168

Change-Id: I93a4e5d8afde7e3abfdcf66220c64cda111d4a48
This commit is contained in:
Martin Kopec 2021-02-26 01:15:29 +00:00
parent 476f4ce243
commit 0074bf3b70
1 changed files with 1 additions and 1 deletions

View File

@ -128,7 +128,7 @@ class TestResultValidator(BaseValidator):
try: try:
pubkey = request.headers.get('X-Public-Key', '') pubkey = request.headers.get('X-Public-Key', '')
try: try:
pubkey.encode('utf-8') pubkey = pubkey.encode('utf-8')
except AttributeError: except AttributeError:
# it's already in bytes # it's already in bytes
pass pass