[gbm-web] redirector: strip stray newline from latest-* keys
- From: Bartłomiej Piotrowski <bpiotrowski src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gbm-web] redirector: strip stray newline from latest-* keys
- Date: Wed, 28 Oct 2020 20:29:48 +0000 (UTC)
commit 56db86885e00829072a36ef0e7b9d352c010b95a
Author: Bartłomiej Piotrowski <bpiotrowski gnome org>
Date: Wed Oct 28 21:28:58 2020 +0100
redirector: strip stray newline from latest-* keys
redirector/main.py | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
---
diff --git a/redirector/main.py b/redirector/main.py
index 30544a4..98b81e5 100644
--- a/redirector/main.py
+++ b/redirector/main.py
@@ -36,7 +36,7 @@ def get_nightly(filename: str):
s3 = boto3.resource('s3')
latest_file_key = f"nightly/{latest_filename}"
obj = s3.Object(cfg.bucket_name, latest_file_key)
- latest = obj.get()['Body'].read().decode('utf-8')
+ latest = obj.get()['Body'].read().decode('utf-8').rstrip()
response = RedirectResponse(f"{cfg.bucket_url}/{latest}")
response.status_code = status.HTTP_301_MOVED_PERMANENTLY
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]