From 05740444720bc1175d5a5c7ac59f2f4c1f1a8c6c Mon Sep 17 00:00:00 2001 From: Daniel Hiepler Date: Tue, 12 Apr 2016 17:13:18 +0200 Subject: [PATCH] more fixes - give protobuf the types it wants --- Spectrum2/backend.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Spectrum2/backend.py b/Spectrum2/backend.py index 2fb678b..5f6d7e2 100644 --- a/Spectrum2/backend.py +++ b/Spectrum2/backend.py @@ -70,7 +70,7 @@ class SpectrumBackend: vcard.id = ID vcard.fullname = fullName vcard.nickname = nickname - vcard.photo = photo + vcard.photo = bytes(photo) message = WRAP(vcard.SerializeToString(), protocol_pb2.WrapperMessage.TYPE_VCARD) self.send(message) @@ -223,7 +223,7 @@ class SpectrumBackend: def handleFTData(self, ftID, data): d = protocol_pb2.FileTransferData() d.ftid = ftID - d.data = data + d.data = bytes(data) message = WRAP(d.SerializeToString(), protocol_pb2.WrapperMessage.TYPE_FT_DATA); self.send(message)