fedora messaging callback: don't open the temp file in binary mode
Signed-off-by: Aurélien Bompard <aurelien@bompard.org>
This commit is contained in:
parent
9d89668ced
commit
8c4b49cdcb
1 changed files with 1 additions and 1 deletions
|
@ -53,7 +53,7 @@ def send_message(msg):
|
||||||
msg["id"] = str(uuid.uuid4())
|
msg["id"] = str(uuid.uuid4())
|
||||||
env = os.environ.copy()
|
env = os.environ.copy()
|
||||||
env["FEDORA_MESSAGING_CONF"] = FEDORA_MESSAGING_CONF
|
env["FEDORA_MESSAGING_CONF"] = FEDORA_MESSAGING_CONF
|
||||||
with NamedTemporaryFile() as msg_file:
|
with NamedTemporaryFile(mode="w+") as msg_file:
|
||||||
json.dump(msg, msg_file)
|
json.dump(msg, msg_file)
|
||||||
result = run(
|
result = run(
|
||||||
["fedora-messaging", "publish", msg_file.name],
|
["fedora-messaging", "publish", msg_file.name],
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue