packages/python/python-dbusmock/0001-Fix-OBEX-PullAll-after-pathlib-conversion.patch

37 lines
1.5 KiB
Diff
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
From: "Jan Alexander Steffens (heftig)" <heftig@archlinux.org>
Date: Tue, 25 Oct 2022 17:39:54 +0000
Subject: [PATCH] Fix OBEX PullAll after pathlib conversion
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
The OBEX tests in folks fail with:
(/build/folks/src/build/tests/bluez/bluez-individual-retrieval:3488):
folks-WARNING **: 17:30:47.981:
Error preparing persona store bluez:00:00:00:00:00:00:
The OBEX address book transfer from device My Phone failed:
GDBus.Error:org.freedesktop.DBus.Error.InvalidArgs:
Invalid arguments: Expected a string or unicode object
`PullAll` passes a `pathlib.Path` to `manager.EmitSignal`. Converting it
to a `str` fixes the issue.
---
dbusmock/templates/bluez5-obex.py | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/dbusmock/templates/bluez5-obex.py b/dbusmock/templates/bluez5-obex.py
index 880e05d65b0a..afc90538d9ea 100644
--- a/dbusmock/templates/bluez5-obex.py
+++ b/dbusmock/templates/bluez5-obex.py
@@ -225,7 +225,7 @@ def PullAll(self, target_file, filters):
# Emit a behind-the-scenes signal that a new transfer has been created.
manager.EmitSignal(OBEX_MOCK_IFACE, 'TransferCreated', 'sa{sv}s',
- [transfer_path, filters, filename])
+ [transfer_path, filters, str(filename)])
return (transfer_path, props)