Merge ~hyask/autopkgtest-cloud:skia/fix_push-amqp into autopkgtest-cloud:master

Proposed by Skia
Status: Merged
Merged at revision: c8753f23cf45b58d472e1d5e3a6ad64253eeb9b2
Proposed branch: ~hyask/autopkgtest-cloud:skia/fix_push-amqp
Merge into: autopkgtest-cloud:master
Diff against target: 24 lines (+3/-3)
1 file modified
charms/focal/autopkgtest-cloud-worker/autopkgtest-cloud/tools/push-amqp (+3/-3)
Reviewer Review Type Date Requested Status
Tim Andersson Approve
Review via email: mp+464402@code.launchpad.net

Description of the change

I may have missed those two things when backporting the cowboy to `master` in the last "fix push-amqp" MP.

To post a comment you must log in.
Revision history for this message
Tim Andersson (andersson123) wrote :

LGTM

review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1diff --git a/charms/focal/autopkgtest-cloud-worker/autopkgtest-cloud/tools/push-amqp b/charms/focal/autopkgtest-cloud-worker/autopkgtest-cloud/tools/push-amqp
2index 5e5ae94..80f70e2 100755
3--- a/charms/focal/autopkgtest-cloud-worker/autopkgtest-cloud/tools/push-amqp
4+++ b/charms/focal/autopkgtest-cloud-worker/autopkgtest-cloud/tools/push-amqp
5@@ -83,7 +83,9 @@ def main():
6 else:
7 while True:
8 message = sys.stdin.readline()
9- if message.startswith("b'") and message.endswith("'"):
10+ if not message:
11+ break
12+ if message.startswith("b'") and message.endswith("'\n"):
13 # this is most likely bytes that we need to interpret as a string
14 # `literal_eval` is far safer than a true `eval`: the warnings
15 # around it in the documentation mostly mention denial of
16@@ -99,8 +101,6 @@ def main():
17 file=sys.stderr,
18 )
19 continue
20- if not message:
21- break
22 try:
23 push(message, queue_name, ch)
24 except (

Subscribers

People subscribed via source and target branches